lua-users home
lua-l archive

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




On Thu, Oct 23, 2014 at 12:02 PM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> On 23 October 2014 11:41, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>
> > However, if "__tostring" has been defined, no traceback is added.
> > Are you willing to share the reasoning behind this with us?
> >
>
> The idea is that the object would be an 'error object', who's __tostring()
> might be a detailed stack trace.
> This means that you can forge useful tracebacks from otherwise weird code
> (e.g. a stack of callbacks).

Exactly. Once you want to control the error message, you better have
full control.

-- Roberto


Thank you! 

These changes look excellent (WHOOP!). We skipped the last alpha (abi compatibility is a pain and we wanted to minimize having to update everything). We will update to this and begin using it at once.

The modification to error is very welcomed but I must say, the serialization features are perhaps most exciting.

For practice, I want to carve out some time to re-implement msgpack and JSON encode/decoding in pure Lua 5.3. I'm very curious about those benchmarks.

Again, thank you to everyone for your hard work.

-Andrew