lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi, all!

Sorry if this is wrong list to ask this question.

We use 3rd party C++ library (CEGUI), which uses toLua++ to generate
Lua bindings for itself. Unfortunately methods of this library can
throw exceptions (an often do it). When such methods are called from
Lua and exception is thrown, my application crashes (since exception
goes to pure C code).

The only feasible solution (seems to be) to wrap all calls from
toLua++ to native C++ code in try-catch blocks.

To do this we want to generate new bindings for this library with
patched toLua++ (using existing .pkg files). Where is the best place
to patch toLua++ to generate try-catch blocks around calls to bound
code?

Thanks in advance,
Alexander.