From: "William E. Kempf" <[EMAIL PROTECTED]> > > From: "Peter Dimov" <[EMAIL PROTECTED]> > > > (And is it useful to distinguish between memory and other resource > > errors?) > > > > This, I have no ready answer for... but "when in doubt, do what POSIX does." > > Why (in regards to "do what POSIX does")? They can make mistakes as easily > as the rest of us.
Because they've had the time to find and correct their mistakes, I'd expect. :-) > If we do seperate them, is there any reason to provide a thread specific memory > exception, or should we use std::bad_alloc? Good question. I'll face the same problem when I finally decide to fix the POSIX lightweight_mutex to check for error returns. :-) [As a side note, do you plan to integrate lightweight_mutex into Boost.Threads?] I'm not sure which piece of information is more important here, the "no memory" part or the "this is a thread exception" part, although I'm leaning towards a std::bad_alloc derived exception (boost::posix_enomem? boost::thread::out_of_memory?) > > An error code (OS or portable) can be of help when one needs to catch all > > thread-related (or better yet, all error code providing) exceptions in a > > single catch clause. Usually this is only needed to report an error, though, > > so if thread exceptions provide some other common mechanism to identify the > > error (like specific what() values), carrying an error code won't be > > necessary. > > And would the above mentioned "localized message" be enough to satisfy this > requirement? I think that it would be enough for my needs. Can't speak for others. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost