1
0
Fork 0
mirror of https://gitlab.com/niansa/libcatch.git synced 2025-03-06 20:53:37 +01:00
libcatch/README.md
2020-11-05 17:51:02 +01:00

518 B

libcatch

A C library to catch and traceback library function errors nicely

Usage

  • Initialise libcatch as early as possible: libcatch_init()
  • Set behavior libcatch_behavior = x (see Behaviors)
  • throw() at any time
  • Use CATCH(expr) for library functions or CATCHNZ(expr) for system calls

Behaviors

Not risking instability:

  • 0: Don't continue
  • 1: Continue once
  • 2: Always continue

Risking instability: (libcatch_faulty will be set on fault)

  • 3: Continue once
  • 4: Always continue