[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua compiled as C++ and exceptions
- From: S <phd.st.p@...>
- Date: Sun, 20 Feb 2011 13:19:17 +0000
Thank you, that works!
At the end I gave up on compiling lua as C++, and I manually check
(via a "wrapper" function to lua_pcall) every call for errors.
Still it would be nice if it were possible just to have Lua throw
std::exceptions containing the error message when lua is compiled as
On 19 February 2011 01:09, GrayFace <firstname.lastname@example.org> wrote:
> On 18.02.2011 5:02, S wrote:
>> To sum up, I need a way to make sure that all errors in Lua (which
>> may happen in say lua_dofile() or lua_call()) result in a
>> std::exception being thrown (which I will catch in my C++ code).
>> If it is possible, it would really help the debugging if an
>> informative message were included in the exception (like: "Parsing
>> error at line 24 of file.lua").
>> Any help / comment is greatly welcome.
> Use lua_pcall. If if fails, you can throw an exception yourself if you want
> Best regards,
> Sergey Rozhenko mailto:email@example.com