Re: Question about error handling
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Question about error handling
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2002年3月12日 10:14:22 -0300
>Along the same lines... is there an easy way to get a string containing the
>stack backtrace that I think the debugging library's default error handler
>generates from a error handler written in Lua?
You can do it yourself:
function _ERRORMESSAGE(s)
print(s)
for i=2,1000 do
local a=getinfo(i)
if a==nil then break end
print(a.short_src,a.currentline,a.name)
end
end
--lhf