[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: exit
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 24 Aug 2000 16:26:24 -0300 (EST)
>I'm using Lua to extend Moray - a 3D modeller for POV-Ray that runs
>under Windows - but I noticed that, in some situations, Lua calls
>_ALERT (wich has been redefined to pop a MessageBox) and exits.
>Well, I can't let Lua exit without giving the user the chance to save
>his/her work. So I would like to know where exactly Lua can call exit
>() and how to avoid it.
If you redefine _ERRORMESSAGE or _ALERT to do your own error handling
and avoid exit().
Or you can register a function to be called when exit is called.
See atexit() from the C library.