Re: [boost] [boost::throw_exception] and platforms where it don't throw

----Original Message---- From: Peter Dimov [mailto:pdimov@mmltd.net] Sent: 08 December 2005 15:40 To: boost@lists.boost.org Subject: Re: [boost] [boost::throw_exception] and platforms where it don'tthrow
And of course in a situation where throw_exception is used to throw bad_alloc, an assertion makes even less sense, because there are no "logic errors" involved, and presenting the effects of a failed assertion to the end user would serve little purpose; the program could do nothing to defend itself from the out of memory situation.
But if a library is being used in an exception free environment, maybe presenting an assertion failure to the user is as good as you can do. -- Martin Bonner Martin.Bonner@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 441434

Martin Bonner wrote:
From: Peter Dimov [mailto:pdimov@mmltd.net]
And of course in a situation where throw_exception is used to throw bad_alloc, an assertion makes even less sense, because there are no "logic errors" involved, and presenting the effects of a failed assertion to the end user would serve little purpose; the program could do nothing to defend itself from the out of memory situation.
But if a library is being used in an exception free environment, maybe presenting an assertion failure to the user is as good as you can do.
Possibly, but who is "you" in the above sentence? The whole point of using an exception is that you the library author do not take responsibility of handling the error, leaving it up to you the library user to do that instead.
participants (2)
-
Martin Bonner
-
Peter Dimov