[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luaL_error from a lua_sethook function?
- From: "Hines, Johnicholas" <Johnicholas-Hines@...>
- Date: Thu, 28 Aug 2008 10:59:22 -0400
Title: luaL_error from a lua_sethook function?
Hi.
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.
The script contains a pcall around several lines of code.
The line hook function calls luaL_error inside of these lines.
I would expect the control flow to work like an exception, propagating up to the pcall, getting handled, and then continuing onward.
Instead, the control flow seems to go directly up to the top luaL_dostring.
Is this how things are supposed to work? Was it mentioned in the documentation somewhere?
Johnicholas