Re: Lua compiled as C++ code & exceptions
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Lua compiled as C++ code & exceptions
- From: eugeny gladkih <john@...>
- Date: 2009年1月22日 21:51:04 +0300
>>>>> "FW" == Florian Weimer <fw@deneb.enyo.de> writes:
>> 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 ;) */ }
>> }
FW> Hmm. Catch-all without a rethrow is a bad idea because it breaks
FW> other stuff as well (some implementations of POSIX thread
FW> cancellation, for instance).
read the comment inside {} ;) logging & exit are The Greatest Action.
--
Yours sincerely, Eugeny.
Doctor Web, Ltd. http://www.drweb.com
+79119997425