lua-users home
lua-l archive

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


> xpcall does not handle ERRERR how it should.
> The error handler for the error handler is itself; not the upper scope
> as you would imagine.

You may argue that this is poor design, but it is not a bug.

Even the design is disputable. If you consider that an error in the
error function should be handled in an upper scope, it would be more
coherent that the current call to 'xpcall' did not return, but instead
long-jumped to the upper xpcall. The current design ensures that xpcall
always returns (that is, it never raises an error), no matter what.

-- Roberto