P99

◆ p99_jmp_report()

void p99_jmp_report ( errno_t  p00_cond)
inline

Report the origin and cause of an error.

Use this if a catch clause needs another layer of try/catch blocks during the cleanup.

// the real application code
} P99_CATCH(int code) {
if (code) p99_jmp_report(code);
// some complicated cleanup that might throw
// errors by itself
} P99_CATCH();
}

Without the call to p99_jmp_report the origin of the error would be lost in the second :P99_CATCH.

Definition at line 70 of file p99_try.h.

P99_TRY
#define P99_TRY
Create a block that can catch exceptions.
Definition: p99_try.h:585
p99_jmp_report
void p99_jmp_report(errno_t p00_cond)
Report the origin and cause of an error.
Definition: p99_try.h:70
P99_CATCH
#define P99_CATCH(...)
Designate a block that is executed regardless of the exceptions that were encountered in the correspo...
Definition: p99_try.h:676