lua-users home
lua-l archive

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

No. The particular problem that has led me away from exit() altogether is
similar to the one I described below. Imagine that you had multiple
lua_States in your process, but that each one was protected from damaging
the memory of the others. In this case, a fatal error in Lua is not a fatal
error for the whole process - just for that lua_State. Therefore, I'd like
to do some more complicated error handling than just exit()


> -----Original Message-----
> From:
> []On Behalf Of Nick Trout
> Sent: Monday, November 19, 2001 9:03 AM
> To: Multiple recipients of list
> Subject: Re: customizable Lua "panic" behavior
> > I agree that there's not much that Lua can do. However it could have a
> > function pointer to a C error handler, which is just enough
> customization
> > for the program that I'm working on. This way, the host
> application has an
> > opportunity to exit in its own way. Also, it may be a context
> in which Lua's
> > memory corruption does not affect the host application, and in
> that case the
> > host application could terminate and restart Lua or something like that.
> Can you not use atexit() if Lua calls exit() ?
> Nick