ErrnoException.set

Initializes local reusable error message based on supplied errno value

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

Parameters

err_num int

error number with same value set as in errno

name string

extern function name that is expected to set errno, optional

file string

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