Boost logo

Boost :

From: Dick.Bridges_at_[hidden]
Date: 2003-01-10 18:18:31


I apologize. I believe I did not express my query clearly. I didn't mean
to suggest that the OS error code be used to define, name or construct an
exception. Those issues are WAY beyond my ability to make any meaningful
contribution to this thread.

On the other hand, *IF* an OS error code were available and was captured at
the point of failure and "tucked away", it could be retrieved for use by an
exception handler (e.g., e.os_error()). As David Abrahams pointed out in
an earlier post:

<snip>
I will weigh in here with one strong opinion: producing localized
error messages should not be the job of the exception object or the
code which throws it. Error message formatting and localization
should happen after exceptions are caught.
</snip>

WRT the code vs the message, my earlier post noted that the localized error
messages are generally keyed to an OS error code. That claim was not
accurate. I believe such messages are generally accessed by a compound key
typically consisting of OS code and language identifier. Depending upon
the program, the language identifier may or may not correspond to that of
the OS as installed. The exception handler would best be able to select
the most appropriate language.

                                                                                                                                        
                      "William E. Kempf"
                      <wekempf_at_[hidden]> To: Boost mailing list <boost_at_[hidden]>
                      Sent by: cc:
                      boost-bounces_at_list Subject: Re: Re: [boost] Re: Next revision of boost::thread & OS error code.
                      s.boost.org
                                                                                                                                        
                                                                                                                                        
                      01/10/2003 02:09
                      PM
                      Please respond to
                      Boost mailing list
                                                                                                                                        
                                                                                                                                        

> From: Dick.Bridges_at_[hidden]
>
> Just a query from a user.
>
> If a localized error message exists, it will very probably be keyed to an
> OS error code. *IF* an OS error code were available at the point of
> failure, would it be possible and/or advisable to include it as part of
the
> exception payload for transport to the handler?

Why the code instead of the message? How do you deal with the issues I
pointed out in my other posts, such as overlapping values and the need for
non-OS error codes?

William E. Kempf
wekempf_at_[hidden]

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk