The OpenD Programming Language

ErrnoEnforce

Calls the C API function fn. If it returns an error value, it throws an ErrnoApiException (or subclass) after getting errno.

template ErrnoEnforce(alias fn, alias errorValue = void)
static if(is(typeof(fn) Return == return))
static if(is(typeof(fn) Params == __parameters))
Return
ErrnoEnforce
(
Params params
,,
string file = __FILE__
,
size_t line = __LINE__
)

Meta