Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 33,192 of 33,346    |
|    DeMarcus to All    |
|    Re: RAII advice (for a RAII newbie)    |
|    04 Sep 13 12:50:35    |
      From: demarcus_at_hotmail_com@tellus.orb.dotsrc.org              > Presumably by "need" you really mean something like "useful". One such       > case is, I suggest, to prevent throwing destructors in circumstances       > where a throwing destructor will break program invariants (as they       > often will). Rather than trying to catch every possible exception which       > may be thrown by the functions called in a destructor by type (which       > may change if those functions' implementations change), it can be useful       > to put the destructor's implementation in a try block, with an       > associated final ellipsis catch for any otherwise uncaught exceptions,       > which logs the error with debugging information and then proceeds (if it       > can) to an orderly close down.       >              Yes. The cases I can come up with myself is in the end of each thread       including main(). Otherwise I haven't seen much use for ellipsis.              I was investigating if one could do some kind of modular failure       handling, but I didn't come up with a complete solution. If anyone have       ideas of exception layers or modular failure handling, I'm interested to       look at it.                     Thanks,       Daniel                     --        [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca