lua-users home
lua-l archive

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


I'm in the midst of wiring in Lua 5.1 work2 and I'm trying to stick closer
to it's exception support rather than using a direct copy of my changes to
work with Objective-C/Cocoa exceptions in Lua 5.0.

The following issues come up:

1. It would be helpful if L_TRY and L_THROW took the Lua state as a
parameter. I could just hardcode L in the macro definitions, but that feels
needlessly messy.

2. Reading seterrorobj, it looks to me like it leaves a random object on the
top of the stack in the event of errors it doesn't understand such as
LUA_ERRFILE.

3. The panic case documentation indicates that the "Lua" is invalid. Is it
the entire universe that is invalid or just this thread within the universe?
Can I simply arrange for the thread to be garbage collected?

4. It would also be nice in the panic case to have access to the error code,
but I can probably just assume LUA_ERRRUN and be correct most of the time.

Mark