P99

◆ P99_THROW_ERRNO

#define P99_THROW_ERRNO   p00_throw_errno(p00_unwind_top, EINVAL, P99_STRINGIFY(__LINE__), __func__, "THROW_ERRNO")

Capture, clean and throw the current value of errno.

This is intended for a cleanup after system functions. A lot of them just return a -1 or so if an error occurred.

FILE* f = fopen("bla.txt", "w");
See also
P99_THROW

Definition at line 269 of file p99_try.h.

f
f
Definition: p99_str.h:138
P99_THROW_ERRNO
#define P99_THROW_ERRNO
Capture, clean and throw the current value of errno.
Definition: p99_try.h:269