openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Macros
cexcept.h File Reference
#include <setjmp.h>
Include dependency graph for cexcept.h:

Go to the source code of this file.

Macros

#define define_exception_type(etype)
 
#define init_exception_context(ec)   ((void)((ec)->penv = 0))
 
#define Try
 
#define exception__catch(action)
 
#define Catch(e)   exception__catch(((e) = the_exception_context->v.etmp, 0))
 
#define Catch_anonymous   exception__catch(0)
 
#define Throw
 

Macro Definition Documentation

◆ Catch

#define Catch (   e)    exception__catch(((e) = the_exception_context->v.etmp, 0))

Definition at line 232 of file cexcept.h.

◆ Catch_anonymous

#define Catch_anonymous   exception__catch(0)

Definition at line 233 of file cexcept.h.

◆ define_exception_type

#define define_exception_type (   etype)
Value:
struct exception_context { \
jmp_buf *penv; \
int caught; \
volatile struct { etype etmp; } v; \
}

Definition at line 197 of file cexcept.h.

◆ exception__catch

#define exception__catch (   action)
Value:
else { } \
the_exception_context->caught = 0; \
} \
else { \
the_exception_context->caught = 1; \
} \
the_exception_context->penv = exception__prev; \
} \
if (!the_exception_context->caught || action) { } \
else

Definition at line 220 of file cexcept.h.

◆ init_exception_context

#define init_exception_context (   ec)    ((void)((ec)->penv = 0))

Definition at line 210 of file cexcept.h.

◆ Throw

#define Throw
Value:
for (;; longjmp(*the_exception_context->penv, 1)) \
the_exception_context->v.etmp =

Definition at line 244 of file cexcept.h.

◆ Try

#define Try
Value:
{ \
jmp_buf *exception__prev, exception__env; \
exception__prev = the_exception_context->penv; \
the_exception_context->penv = &exception__env; \
if (setjmp(exception__env) == 0) { \
if (&exception__prev)

Definition at line 212 of file cexcept.h.