int DoFunc(lua_State* p)
//throw "error"; //if I use throw, the program works fine
lua_State* p = luaL_newstate();
If I use lua_error to throw a exception, the program will abort when second call DoFunc.The output is
terminate called without an active exception
But when I use throw instead, all works fine. My linux version is 2.6.18-164.el5 x86_64
I know that longjmp will jump the stack, maybe use lua_error and longjmp destroy something in luajit and then use lua_error again cause abort?
In the luajit extensions, it said "Throwing Lua errors across C++ frames is safe", maybe can't be used with longjmp at same time?