[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Binding C++ functions that 'throw' exceptions
- From: "RJP Computing" <rjpcomputing@...>
- Date: Thu, 16 Aug 2007 15:25:57 -0400
On 8/16/07, Thomas Breuel <firstname.lastname@example.org> wrote:
We're having the same problem, and I asked about this a few days ago; unfortunately, there has been no official answer from the Lua, tolua, or tolua++ maintainers yet.
Unless we hear about anybody else working on an official solution soon, we're probably going to start modifying tolua++ (there are some other features we need as well). I believe all tolua++ needs is to have a couple of hooks added so that the exception handlers can then be implemented as a loadable tolua++ extension (we're using tolua++ because of its improved garbage collection).
Is there any way I can get my hands on this or even help where I can? I
was thinking of doing that exact implementation to fix the problem. It
seems like a waste of effort. What do you think?
The solution you describe seems to be the cleanest and most universal
fix. It allows for the most flexibility. I was also thinking that you
need to specify the exception in the .pkg file.
void MyFunction( someParameter ) throws
void MyFunction( someParameter ) throws ExceptionType
I have not even started to look at the design of toLua++ yet so I don't
know, if in the second example, the type is even useful. It was just a
couple of thoughts.