#include <error.hh>
Public Member Functions | |
template<typename... Args> | |
SysError (int errNo, const Args &... args) | |
template<typename... Args> | |
SysError (const Args &... args) | |
Public Attributes | |
int | errNo |
POSIX system error, created using errno
, strerror
friends.
Throw this, but prefer not to catch this, and catch SystemError
instead. This allows implementations to freely switch between this and windows::WinError
without breaking catch blocks.
However, it is permissible to catch this and rethrow so long as certain conditions are not met (e.g. to catch only if errNo = EFooBar
). In that case, try to also catch the equivalent windows::WinError
code.
PosixError
or similar. At this point Windows support is too WIP to justify the code churn, but if it is finished then a better identifier becomes moe worth it. Construct using the explicitly-provided error number. strerror
will be used to try to add additional information to the message.
|
inline |
Construct using the ambient errno
.
Be sure to not perform another errno
-modifying operation before calling this constructor!