lua-users home
lua-l archive

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

> You could do everything in Lua (except for calling throw()).

I still find it quite unfortunate. Lua 5.1 had debug.traceback, which
you could assign a function from your script and as the result provide
a "default" error handler.

Roberto, why not provide a "e" (error) debug hook that will be called
before throwing the error, which would allow the user to look at the
stack, analyze the variables, and maybe even run some commands in the
debugger? Maybe two different hooks for pcall-wrapped and not-wrapped

This would allow implementation of break-on-error in a debugger at the
Lua level.