[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Error Propagation
- From: "Wesley Smith" <wesley.hoke@...>
- Date: Sun, 7 Jan 2007 13:15:50 -0800
I've integrated Lua into my project by having some (const char *)s
hard coded into the C source files for assigning and manipulating
metatables of my userdata while the scripts are loaded from disk.
When there's an error and the Lua as gone through one of the hard
coded Lua chunks in my C code, luaL_error reports a line number from
the Lua chunk in my C source. What I'd like to do instead is have the
error track back from the C function back through the metafunctions in
my C source, and finally back into the loaded from disk Lua script and
report the line number there. Is this possible?
I basically have this structure
Lua Script -> C source metafunctions -> C function
How can I propagate back up to the Lua Script level from a detected
error in the C function and subsequently report the line number with
luaL_where()?
thanks,
wes