[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua compiled as C++ and exceptions
- From: GrayFace <sergroj@...>
- Date: Sat, 19 Feb 2011 07:09:26 +0600
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
Sergey Rozhenko mailto:email@example.com