ErrnoException.set

Initializes local reusable error message based on supplied errno value

class ErrnoException
typeof(this)
set
(,
istring name = ""
,
istring file = __FILE__
,
int line = __LINE__
)

Parameters

err_num int

error number with same value set as in errno

name istring

extern function name that is expected to set errno, optional

file istring

file where the exception errno is set

line int

line where the exception errno is set

Return Value

Type: typeof(this)

this

Examples

auto e = new ErrnoException;
e.set(0);
test!("==")(e.message(), "Expected non-zero errno after failure"[]);

Meta