[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Redirecting IO
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 6 Nov 2001 22:50:09 -0200
>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.