From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-12-12 16:12:21
At 02:14 PM 12/12/2002, Peter Dimov wrote:
>From: "Beman Dawes" <bdawes_at_[hidden]>
>> The exception class has been given additional functionality to provide
>> portable error code. Etc, etc.
>Q: have you considered using standard errno codes as the portable error
If I understand your question, this is now being done.
The filesystem_error class now has two member functions returning error
int native_error() const; // returns system specific code
// such as a POSIX or Windows error code
error_code error() const; // same on all systems; see below
no_error = 0,
system_error, // system generated error;
// if possible, is translated
// to one of the more specific errors below.
other_error, // library generated error
security_error, // includes access rights, permissions failures
path_error, // path format or a name in the path is invalid
busy_error, // implies trying again might succeed
Is that what you meant by "standard errno code"?
The alternative I considered was to try to map the system specific code
into a POSIX errno code. However, the macros seemed messy for C++.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk