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
15void Except_raise(const T *e, const char *file,
16 int line) {
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;
35 longjmp(p->env, Except_raised);
36}
Except_Frame * Except_stack
Definition: except.c:14
void Except_raise(const T *e, const char *file, int line)
Definition: except.c:15
@ Except_raised
Definition: except.h:22
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