lua-users home
lua-l archive

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

> 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 ;)

-- Roberto