[c++-pthreads] Re: thread-safety definition

Matt Austern austern at apple.com
Fri Jan 30 22:16:39 UTC 2004


On Jan 17, 2004, at 10:38 PM, Wil Evers wrote:

> Matt Austern wrote:
>
>> On Jan 16, 2004, at 7:26 PM, David Abrahams wrote:
>>> AFAICT the discussion is about whether it makes sense to support
>>> programs which do catch(...) without rethrowing, and if so, how.
>>> Right now we're discussing a morality issue: "is it inherently evil 
>>> to
>>> catch(...)  without rethrowing?"
>>  And my position on the morality question would be that yes, it
>> is inherently evil, but that sometimes programs have to do evil
>> things.  I can think of a couple of designs that rely on being
>> able to catch exceptions and not rethrow them, and I'm sure you
>> can too.  (Mostly designs where the catch(...) is part of an
>> adapter layer that translates between one kind of error reporting
>> mechanism and another one.  The (...) will get translated into
>> something like "unknown error".)
>
> Do you think that designs that rely on catch(...) without rethrow to 
> comply with the 'destructors must not throw' principle are 
> unreasonable?

No.  I think designs like that are ugly, but sometimes an ugly solution 
is the only one that can work.

			--Matt




More information about the c++-pthreads mailing list