diff --git a/errors.lua b/errors.lua index 8dad2e2..2484649 100644 --- a/errors.lua +++ b/errors.lua @@ -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)