[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: debug.traceback() oddity
- From: David Given <dg@...>
- Date: Mon, 09 Nov 2009 16:02:20 +0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roberto Ierusalimschy wrote:
[...]
> The first argument cannot be nil. Because the first argument is an
> optional thread, and nil is not a thread, the function gets confused
> about what is what. The call without the nil gives a correct answer.
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?
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?
debug.traceback(level) doesn't seem to do what I want.
(I have to say that leading optional arguments are extremely confusing.
It was only after reading your message here that I realised how they're
supposed to work --- previously I'd been passing in nil to indicate 'no
argument here'...)
- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "There is nothing in the world so dangerous --- and I mean *nothing*
│ --- as a children's story that happens to be true." --- Master Li Kao,
│ _The Bridge of Birds_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkr4PQoACgkQf9E0noFvlzixrQCfeM5vxANBPR7O5jKOBm6Ekvuo
E88AnjSDRgGd76vjDJFvid7fGe//QkCM
=cuEM
-----END PGP SIGNATURE-----