|
At 2003-01-03 23:12, Pascal Maillard wrote:
Hi, I have got a problem using lua 5.0 (beta) under Linux: I have integrated lua into my C++ app and I execute a lua script using lua_dofile() inside a try block. In this script, I call a registered global C function. When I throw a value inside this C function, using the C++ command throw, that should be caught by the catch block corresponding to the try block mentioned above, the program aborts recieving a SIGABRT. Is there any possibility to get around this problem, or is it a bug?
I don't think you can throw exceptions through C-functions. One solution may be to compile lua as c++ code.
Maybe you should use lua's own error handling. ---Arvid Norberg