[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Debugging a C error handling function
- From: "Ruan Kendall" <shearwater+lua@...>
- Date: Thu, 10 Jul 2008 20:23:30 +0100
We're running a moderately complex application which is written in
C++, and uses lua scripts as event handlers, amongst other things.
I wrote a simple error handling function, which is uses as the error
handler by lua_pcall.
Under normal circumstances, it works just fine. However, under certain
circumstances (I'm not totally sure what all of these are yet) such as
C pcalls a lua script which calls a C function which pcalls a faulty
lua script, the error handler breaks. Even a totally empty error
handler like
int l_handle_error(lua_State* L) {
return 0
}
still ends up generating a LUA_ERRERR error. No coroutines are involved at all
I'm not entirely certain under what circumstances ERRERR is returned,
and I haven't been able to gather this information from reading the
lua source.
Any advice?
- Ruan