lua-users home
lua-l archive

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


Romulo Bahiense wrote:
>> Er, I meant they don't provide a stack trace or anything.
> 
> Well, kind of. If your error handler honors __tostring metamethod ...

Unfortunately if any error handler happens to use the C version of the
tostring function (lua_tostring) to display the error object, as in the
case of the lua command line interpreter for uncaught exceptions,
__tostring will not be honored.

I'm planning a related talk for the Lua workshop
(http://memebeam.org/john/lua/exception_patterns_abstract.html).  I'm
facing a dilemma of whether to wait until the workshop (8 months away)
to release the material, as the exception topic has come up a number of
times recently.

--John