Don't try to add stack traces to non-string errors
This commit is contained in:
parent
ec7d75d1ae
commit
32990fce49
1 changed files with 4 additions and 1 deletions
|
@ -613,7 +613,10 @@ namespace Automation4 {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
std::string message = get_string_or_default(L, 1);
|
||||
const char *err = lua_tostring(L, 1);
|
||||
if (!err) return 1;
|
||||
|
||||
std::string message = err;
|
||||
if (lua_gettop(L))
|
||||
lua_pop(L, 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue