This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] system_error, round one


Ulrich Drepper wrote:

And I would definitely do away the "other" thing. As I wrote, new
error codes are not an exception which must be flagged, they are
introduced pretty regularly. The C++ runtime cannot be written to
flip out when t his happens or drop the information. Fold all
additional error codes into "other" drop information. Programmers
won't be able to determine what really happened.

The native category errors should always report the exact error code returned by the operating system, and should never fold that exact error code into something else. Allowing the programmer to determine exactly what happened is why the native category exists.


Some application, however, need to write portable code that is independent of the native operating system. They can use the posix() member function to obtain the portable posix_errno value. By definition, that must meet the POSIX spec, and so needs a value for codes that don't translate well into one of the posix_errno codes.

--Beman Dawes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]