[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Panic Behaviour? (Re: Lua Exception Patch)
- From: "James Porter" <porterj@...>
- Date: Fri, 26 Oct 2007 12:41:05 -0500
On 10/26/07, Colin <share-lua@think42.com> wrote:
> On Fri, Oct 26, 2007 at 01:55:48PM +0200, Colin wrote:
> Back to square one.
Yeah, basically. Thanks for looking over the patch, though. I have a
pretty clear idea of what's necessary now to make this work properly
(as opposed to hoping I get lucky and the lua_State is still useable).
I think wrapping the call to luaD_call in lua_call with a try/catch
block should be sufficient. The catch block could then handle error
recovery in roughly the same way as luaD_pcall, and create
lua_exceptions at that point, rather than in luaD_throw (removing the
extra string copies with lua_pcall). I'd have to make the LUAI_TRY
macro a little more complicated to handle the changes, but I'm
confident that I can avoid future problems.
Thanks again,
James