- ReusableImpl
mixin ReusableExceptionImplementation!() ReusableImpl
Provides standard reusable exception API
- errorNumber
int errorNumber()
- failedFunctionName
string failedFunctionName()
- enforce
void enforce(bool expr, cstring msg, string name, string file, int line)
Tries to evaluate expr. If it fails, checks the global errno and
uses matching message as base for exception message, as well as throws
the exception.
- enforceRet
Caller!(typeof(&Func)) enforceRet(bool function(ReturnTypeOf!(Func)) verify, string file, int line)
Calls Func automatically checking errno and storing name
- enforceRetPtr
Caller!(typeof(&Func)) enforceRetPtr(string file, int line)
Calls enforceRet expecting Func to return non-NULL
- enforceRetCode
Caller!(typeof(&Func)) enforceRetCode(string file, int line)
Calls enforceRet interpreting return value as error code
- useGlobalErrno
typeof(this) useGlobalErrno(string name, string file, int line)
Initializes local reusable error message based on global errno value
and resets errno to 0.
- set
typeof(this) set(int err_num, string name, string file, int line)
Initializes local reusable error message based on supplied errno value
- addMessage
typeof(this) addMessage(cstring msg)
Convenience method to append extra message in brackets
errno exception type for signal events.