lua-users home
lua-l archive

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


The function definition in the reference manual for debug.traceback is:

debug.traceback ([thread,] [message [, level]])

if I do:
`debug.traceback(0,( msg.mc_reason or ""), 0)`

i get 
-->
test_error_object.lua:56: bad argument #2 to 'traceback' (number expected, got string)

The only way that i can correct this is flip the message and the first parameter. 

Am i missing something? It looks like ([thread,] [message [, level]]) is telling me to put it in the second position...

Also, a quick verification on thread vs. level:

thread is the position to run the traceback argument from. The level is where to start the stack trace? I'm having trouble making the second number do anything and trouble understanding the problem that they both need to solve. (I use level and know what that is for. I just don't know how it stands apart thread...

-Andrew