lua-users home
lua-l archive

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


On 3 November 2011 13:53, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> On Thu, Nov 3, 2011 at 11:42 AM, liam mail <liam.list@googlemail.com> wrote:
>>

>> Why not overwrite the traceback function and strip the message down to
>> the information you want to reveal? Personally when I ask for a
>> traceback (which is what error is doing) I want to see the traceback
>> :)
>>
>> Liam
>
> By the way: what do you guys use when you have to define your own
> traceback functions?

> I'd like to stop reinventing the wheel (and making it square). Any
> pointers/suggestions?

Afraid not. Here's my wheel that I committed earlier today:
http://hg.prosody.im/trunk/file/5d7d9a60bc7f/util/debug.lua

I have to say, debug.traceback()'s parameter-handling logic is
absolutely mind-bending and bites me every time I try to use it.
Implementing it was even worse (I don't claim I've got it completely
identical already).

Regards,
Matthew