feat: Add stack trace to argument check error
Just the error message is not enough to track errors in commonly used functions.
This commit is contained in:
parent
b6bdc3848e
commit
edf5b33234
1 changed files with 4 additions and 2 deletions
|
@ -14,8 +14,10 @@ function dmf.check_wrong_argument_type(mod, dmf_function_name, argument_name, ar
|
|||
end
|
||||
end
|
||||
|
||||
mod:error("(%s): argument '%s' should have the '%s' type, not '%s'", dmf_function_name, argument_name,
|
||||
table.concat(allowed_types, "/"), argument_type)
|
||||
mod:error(
|
||||
"(%s): argument '%s' should have the '%s' type, not '%s'\n%s",
|
||||
dmf_function_name, argument_name, table.concat(allowed_types, "/"), argument_type, Script.callstack()
|
||||
)
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue