Don't try to add stack traces to non-string errors

This commit is contained in:
Thomas Goyne 2013-09-21 16:10:53 -07:00
parent ec7d75d1ae
commit 32990fce49

View file

@ -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);