[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C++ throw problem
- From: Arvid Norberg <c99ang@...>
- Date: Sat, 04 Jan 2003 15:30:25 +0100
At 2003-01-03 23:12, Pascal Maillard wrote:
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.