[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: debug.traceback() oddity
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 9 Nov 2009 15:25:42 -0200
> I did wonder about this, but since coroutine.running() returns nil when
> in the main thread, I assumed it was all right... how do I find out what
> the currently running thread is?
You do not. (This will be fixed in 5.2.)
> Is the correct invocation debug.traceback(message, level) if I'm not
> specifying a thread, then?
> What if I don't want a message either?
You cannot give a level without a message. (In 5.2 traceback(nil, level)
will do that.)
> (I have to say that leading optional arguments are extremely confusing.
Yes :( That is the price of adding things while mantaining compatibility
with previous versions. (Just ask Microsoft ;)