lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>An Alert Box pops up
>with the Test Message but is immediatly followed by 
>another one: "unable to recover; exiting" obviously 
>comming from luaD_breakrun(). What's wrong here ?

This is the expected behavior:  lua_error stops the execution of the current
Lua thread. In your case, there was no thread to execute and so Lua was
unable to recover and go back to the host application. lua_error never returns!

To get what you want, first create a Lua C function that calls lua_error and
then call this Lua C function. A simple lua_dostring(L,"error'hi there'")
should also work.