Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
It may be useful to return an error code from various functions to be able to distinguish different kinds of errors. E.g. for being able to ignore ENOENT from unlink(). This can be achieved by returning Try<T, ErrnoError>, but this is not portable.
Since C++11 STL has std::error_code that hides platform-dependent error code behind a portable error condition. We can use it for error reporting.