[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua compiled as C++ code & exceptions
- From: Florian Weimer <fw@...>
- Date: Thu, 22 Jan 2009 19:15:59 +0100
* eugeny gladkih:
> int my_func( lua_State *L ) {
> try {
> // blah-blah, possible call funcs from some library
> // call to some Lua function raising error
> // blah, once again
> }
> catch( myexception ) { /* do some great work */ }
> catch( void* ) { throw; /* conceivably Lua exception? */ }
> catch( ... ) { /* general error suicide ;) */ }
> }
Hmm. Catch-all without a rethrow is a bad idea because it breaks
other stuff as well (some implementations of POSIX thread
cancellation, for instance).
Can't you override std::unexpected() instead?