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.c
浏览该文件的文档.
1
6
#include <stdlib.h>
7
#include <stdio.h>
8
#include <assert.h>
9
#include "../include_cii/except.h"
10
#define T Except_T
11
#ifdef WIN32
12
__declspec(thread)
13
#endif
14
Except_Frame
*
Except_stack
= NULL;
15
void
Except_raise
(
const
T
*e,
const
char
*file,
16
int
line) {
17
Except_Frame
*p =
Except_stack
;
18
assert(e);
19
if
(p == NULL) {
20
fprintf(stderr,
"Uncaught exception"
);
21
if
(e->
reason
)
22
fprintf(stderr,
" %s"
, e->
reason
);
23
else
24
fprintf(stderr,
" at 0x%p"
, (
void
*)e);
25
if
(file && line > 0)
26
fprintf(stderr,
" raised at %s:%d\n"
, file, line);
27
fprintf(stderr,
"aborting...\n"
);
28
fflush(stderr);
29
abort();
30
}
31
p->
exception
= e;
32
p->
file
= file;
33
p->
line
= line;
34
Except_stack
=
Except_stack
->
prev
;
35
longjmp(p->
env
,
Except_raised
);
36
}
Except_stack
Except_Frame * Except_stack
Definition:
except.c:14
Except_raise
void Except_raise(const T *e, const char *file, int line)
Definition:
except.c:15
Except_raised
@ Except_raised
Definition:
except.h:22
Except_Frame
Definition:
except.h:15
Except_Frame::prev
Except_Frame * prev
Definition:
except.h:16
Except_Frame::line
int line
Definition:
except.h:19
Except_Frame::exception
const T * exception
Definition:
except.h:20
Except_Frame::file
const char * file
Definition:
except.h:18
Except_Frame::env
jmp_buf env
Definition:
except.h:17
T
Definition:
except.h:11
T::reason
char * reason
Definition:
except.h:12
src~
src_cii
except.c
制作者
1.9.3