[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: I need your help! C++ exception in coroutine Crashes.
- From: "Patrick Donnelly" <batrick.donnelly@...>
- Date: Thu, 2 Oct 2008 12:49:18 -0600
On Thu, Oct 2, 2008 at 6:37 AM, Aidin Abedi <firstname.lastname@example.org> wrote:
> I've embedded lua and when I call a c++ function (that throws a c++
> exception) inside a coroutine my app crashes badly. Windows just says:
> "Runtime Error!
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information."
> I do have a c++ exception-catch outside the pcall. There is no crash
> if I call the same function (that throws a exception) from inside
> lua's main-thread.
> This issue must have been detected before. Please help me!
> I appreciate any ideas. I thank you for your time.
It sounds to me like you did a generic lua_call in the main thread
(instead of lua_resume). When Lua catches the error, and no error
handler was set for that thread, it will exit the main application.
You should implement a panic handler to check if this is the case.
"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."