lua-users home
lua-l archive

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


Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> xpcall(function() error("Hi!", 0) end, function(h) print(h) print(debug.traceback()) end)
Hi!
stack traceback:
    stdin:1: in function <stdin:1>
    [C]: in function 'error'
    stdin:1: in function <stdin:1>
    [C]: in function 'xpcall'
    stdin:1: in main chunk
    [C]: in ?
> c = coroutine.create(function() error("Hi!", 0) end) t = table.pack(coroutine.resume(c)) if not t[1] then print(t[2]) print(debug.traceback(c)) end
Hi!
stack traceback:
    [C]: in function 'error'
    stdin:1: in function <stdin:1>
> error("Hi!", 0)
Hi!
stack traceback:
    [C]: in function 'error'
    stdin:1: in main chunk
    [C]: in ?


Why's it giving me a stacktrace? I thought error(msg, 0) would hide them?
-- 
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.