hydrocode_Radial_Lag 0.3
This is an implementation of fully explict forward Euler scheme for multi-D radially symmetric compressible flows on Lagrangian coordinate
except.h
浏览该文件的文档.
1
7#ifndef EXCEPT_INCLUDED
8#define EXCEPT_INCLUDED
9#include <setjmp.h>
10#define T Except_T
11typedef struct T {
12 char *reason;
13} T;
17 jmp_buf env;
18 const char *file;
19 int line;
20 const T *exception;
21};
24#ifdef WIN32
25__declspec(thread)
26#endif
28extern const Except_T Assert_Failed;
29void Except_raise(const T *e, const char *file,int line);
30#define RAISE(e) Except_raise(&(e), __FILE__, __LINE__)
31#define RERAISE Except_raise(Except_frame.exception, \
32 Except_frame.file, Except_frame.line)
33#define RETURN switch (Except_stack = Except_stack->prev,0) default: return
34#define TRY do { \
35 volatile int Except_flag; \
36 Except_Frame Except_frame; \
37 Except_frame.prev = Except_stack; \
38 Except_stack = &Except_frame; \
39 Except_flag = setjmp(Except_frame.env); \
40 if (Except_flag == Except_entered) {
41#define EXCEPT(e) \
42 if (Except_flag == Except_entered) Except_stack = Except_stack->prev; \
43 } else if (Except_frame.exception == &(e)) { \
44 Except_flag = Except_handled;
45#define ELSE \
46 if (Except_flag == Except_entered) Except_stack = Except_stack->prev; \
47 } else { \
48 Except_flag = Except_handled;
49#define FINALLY \
50 if (Except_flag == Except_entered) Except_stack = Except_stack->prev; \
51 } { \
52 if (Except_flag == Except_entered) \
53 Except_flag = Except_finalized;
54#define END_TRY \
55 if (Except_flag == Except_entered) Except_stack = Except_stack->prev; \
56 } if (Except_flag == Except_raised) RERAISE; \
57} while (0)
58#undef T
59#endif
const Except_T Assert_Failed
@ Except_entered
Definition: except.h:22
@ Except_raised
Definition: except.h:22
@ Except_finalized
Definition: except.h:23
@ Except_handled
Definition: except.h:23
#define T
Definition: except.h:10
Except_Frame * Except_stack
Definition: except.c:14
void Except_raise(const T *e, const char *file, int line)
Definition: except.c:15
Except_Frame * prev
Definition: except.h:16
int line
Definition: except.h:19
const T * exception
Definition: except.h:20
const char * file
Definition: except.h:18
jmp_buf env
Definition: except.h:17
Definition: except.h:11
char * reason
Definition: except.h:12