[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luaL_error from a lua_sethook function?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 28 Aug 2008 17:18:44 -0300
> 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))