Sorry for the late reply, have been fairly busy as of late. I'm going to have to _strongly_ disagree with the tide of this discussion.
On Wednesday 22 August 2007 03:25, Anders Olofsson wrote: > Didn't know about that one but after some googling I must say that > std::unexpected sounds perfect to use. If we are just gonna catch the > critical exceptions in one place anyway it must be better to use it > instead of adding it to throw clause on all functions which will also > allow any non-critical exceptions which we might not want to allow > everywhere. Yes, it sounds perfect, but when you try it out you will see that it is more of a deterrent than anything else. std::unexpected does not return a value, which means that there are only 2 things it can do: 1) Rethrow an exception that just happens to be in the specifier of the original function. 2) Terminate the program. #1 relies on luck, and #2 is not much of a solution either. > Yes, if you're gonna have that kind of error handling for every call, > we'll have 10 times the size of the code just for all those catch > blocks. Better to have it in one place and make that as good handling as > possible. Why have it only one place? Why not have it in the appropriate places: The boundaries of the daemon. Even without an exception specification, the document should provide the details of what exceptions to expect. Other exceptions, should indicate a fatal error condition. i.e., no memory left, corrupted memory, etc. Jon -- ________________________________________________________ Jon Keating ICQ: 16325723 [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] http://www.licq.org GPG: 2290A71F http://www.thejon.org HOME: Minamiashigara, Japan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Licq Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/licq-dev?hl=en -~----------~----~----~----~------~----~------~--~---
