How can I get the error message which returned from lua?
luohui8891 opened this issue · 2 comments
luohui8891 commented
Yo,
How can I get any error message from lua level when I wax_runLuaString
a lua script (like missing end
)?
intheway commented
wax_start(nil, nil);
int i = wax_runLuaString("print('hello wax)");
if(i){
NSLog(@"error=%s", lua_tostring(wax_currentLuaState(), -1));
}
luohui8891 commented
Got it. Thanks.
BTW, why there are many debug log like NSLog(@"data->waxRetain = YES instance=%@", data->instance);
in the source code, just asking.