lua-users home
lua-l archive

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


>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