same as enforceRet
extern(C) static void* func ( ) { .errno = EMFILE; return null; } try { (new ErrnoException).enforceRetPtr!(func).call(); test(false); } catch (ErrnoException e) { test!("==")(e.message(), "func: Too many open files"[]); test!("==")(e.line, __LINE__ - 6); }
Calls enforceRet expecting Func to return non-NULL
Wraps enforceRet with a lambda that verifies that return value is not null