At 10:36 AM 1/14/2003, David Abrahams wrote:
>David Abrahams <[EMAIL PROTECTED]> writes:
>
>> Beman Dawes <[EMAIL PROTECTED]> writes:
>>
>>> At 03:29 PM 1/13/2003, David Abrahams wrote:
>>>
>>> >Remember that it's a bad idea to carry dynamically-allocated
>>> >state in an exception object.
>>>
>>> I wrestled with that a long time with the Filesystem Library, and
>>> finally ignored it. The advice is good in general, but there just
>>> didn't seem to be any way to meet the needs of users without
>>> carrying several paths (which contain std::strings.)
>>
>> Then as a last resort you ought to be holding them via shared_ptr.
>> It's critical that the exception object doesn't throw when it's
>> copied.
>
>Having looked at filesystem_error, I see that it does not adopt this
>practice. This is a very serious design error, IMO, which can be
>easily avoided. Just to clarify, if an exception object's copy
>constructor throws, the program goes directly to terminate().
Yes, the code needs to be changed.
Hopefully, the interface is now close to stable. I probably should change
who() to return a const char * however.
--Beman
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
- Re: [boost] Re: Next revision of boost::thread &... William E. Kempf
- Re: [boost] Re: Next revision of boost::thread &a... David Abrahams
- Re: [boost] Re: Next revision of boost::thread &... William E. Kempf
- Re: [boost] Re: Next revision of boost::thread &... David Abrahams
- Re: [boost] Re: Next revision of boost::thread &... Beman Dawes
- Re: [boost] Re: Next revision of boost::thread &... Peter Dimov
- Re: [boost] Re: Next revision of boost::thread &... David Abrahams
- Re: [boost] Re: Next revision of boost::thread &... David Abrahams
- Re: [boost] Re: Next revision of boost::thread &... Beman Dawes
- Re: [boost] Re: Next revision of boost::thread &... William E. Kempf
- Re: [boost] Re: Next revision of boost::thread &... Peter Dimov
- Re: [boost] Re: Next revision of boost::thread &... William E. Kempf
- Re: [boost] Re: Next revision of boost::thread &... Peter Dimov
- Re: [boost] Re: Next revision of boost::thread &... William E. Kempf
- Re: [boost] Re: Next revision of boost::thread &... Beman Dawes
- Re: [boost] Re: Next revision of boost::thread &... Peter Dimov
- Re: [boost] Re: Next revision of boost::thread &... William E. Kempf
- Re: [boost] Re: Next revision of boost::thread&a... David Abrahams
- Re: [boost] Re: Next revision of boost::thread &... William E. Kempf