Improved error reporting on incorrect arguments
This commit is contained in:
parent
ef9c34b7cd
commit
32c88386f3
|
@ -86,10 +86,10 @@ local function correct_error (self, module_suffix, format_msg, gotten_string, po
|
|||
assert(type(module_suffix) == 'string')
|
||||
format_msg = format_msg or DEFAULT_ERROR_MSG_CORRECT
|
||||
lvl = lvl or 0
|
||||
assert(type(format_msg) == 'string')
|
||||
assert(type(gotten_string) == 'string')
|
||||
assert(type(possible_strings) == 'table')
|
||||
assert(type(lvl) == 'number')
|
||||
assert(type(format_msg) == 'string', 'Internal errors error: incorrect type for argument format_msg')
|
||||
assert(type(gotten_string) == 'string', 'Internal errors error: incorrect type for argument gotten_string')
|
||||
assert(type(possible_strings) == 'table', 'Internal errors error: incorrect type for argument possible_strings')
|
||||
assert(type(lvl) == 'number', 'Internal errors error: incorrect type for argument lvl')
|
||||
|
||||
-- Do stuff
|
||||
possible_strings = string_dist.strings_with_highest_similarity(gotten_string, possible_strings)
|
||||
|
|
Loading…
Reference in New Issue
Block a user