alibaba / wax

Wax is a framework that lets you write native iPhone apps in Lua.
http://github.com/probablycorey/wax
MIT License
1.84k stars 280 forks source link

How can I get the error message which returned from lua? #22

Closed luohui8891 closed 8 years ago

luohui8891 commented 8 years ago

Yo, How can I get any error message from lua level when I wax_runLuaString a lua script (like missing end)?

intheway commented 8 years ago
wax_start(nil, nil);
int i = wax_runLuaString("print('hello wax)");
if(i){
    NSLog(@"error=%s", lua_tostring(wax_currentLuaState(), -1));
}
luohui8891 commented 8 years ago

Got it. Thanks. BTW, why there are many debug log like NSLog(@"data->waxRetain = YES instance=%@", data->instance); in the source code, just asking.