[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: luaL_error from a lua_sethook function?
- From: "Hines, Johnicholas" <Johnicholas-Hines@...>
- Date: Fri, 29 Aug 2008 08:01:10 -0400
I tried to minimize my failing example, and the minimization caused it to start working.
So now I have a lead on where the bug is.
Thanks for your help.
Johnicholas
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br on behalf of Luiz Henrique de Figueiredo
Sent: Thu 8/28/2008 4:18 PM
To: Lua list
Subject: Re: luaL_error from a lua_sethook function?
> I was surprised at finding that (unless I'm mistaken) it's not possible to catch a luaL_error thrown from a lua_sethook function.
Sure is. The code below works fine. Could you please show us your code?
function f(x,y,z)
print("hook",x,y,z)
error"boom"
end
function g()
print"0"
debug.sethook(f,"l")
print"1"
print"2"
end
print("pcall",pcall(g))
<<winmail.dat>>