Constructor which takes an error message. The current global core.stdc.errno.errno value is used as error code.
Constructor which takes an error message and error code.
Operating system error code.
Localized error message generated through core.stdc.string.strerror_r or core.stdc.string.strerror.
import core.stdc.errno : EAGAIN; auto ex = new ErrnoException("oh no", EAGAIN); assert(ex.errno == EAGAIN);
errno is used by default if no explicit error code is provided
import core.stdc.errno : errno, EAGAIN; auto old = errno; scope(exit) errno = old; // fake that errno got set by the callee errno = EAGAIN; auto ex = new ErrnoException("oh no"); assert(ex.errno == EAGAIN);
Thrown if errors that set errno occur.