2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
#pragma implement interface "longjump.h"
|
|
|
32 |
#include "implement.h"
|
|
|
33 |
#pragma implement interface "throw.h"
|
|
|
34 |
#include <exception>
|
|
|
35 |
using namespace std ;
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
/*
|
|
|
39 |
IMPLEMENTATION OF EXCEPTION HANDLING INTERFACE
|
|
|
40 |
|
|
|
41 |
These declarations and macro definitions give the implementation of
|
|
|
42 |
the exception handling tokens declared in throw.h.
|
|
|
43 |
*/
|
|
|
44 |
|
|
|
45 |
#define throw_exception( X, Y, Z )\
|
|
|
46 |
( __TCPPLUS_throw ( ( X ), ( Y ), ( Z ) ) )
|
|
|
47 |
|
|
|
48 |
#define rethrow_exception() ( __TCPPLUS_throw ( NULL, NULL, NULL ) )
|
|
|
49 |
#define catch_exception( X ) ( __TCPPLUS_catch ( ( X ) ) )
|
|
|
50 |
#define alloc_exception( X ) ( __TCPPLUS_alloc_except ( ( X ) ) )
|
|
|
51 |
#define value_exception ( __TCPPLUS_except.value [1] )
|
|
|
52 |
#define caught_exception() ( __TCPPLUS_except.unwinding = false )
|
|
|
53 |
#define end_exception() ( __TCPPLUS_handled () )
|
|
|
54 |
#define ill_exception( X ) ( __TCPPLUS_unexpected ( ( X ) ) )
|
|
|
55 |
|
|
|
56 |
typedef EXCEPTION exception_type ;
|
|
|
57 |
|
|
|
58 |
#define try_begin( X, Y, Z )\
|
|
|
59 |
{\
|
|
|
60 |
( X )->frame = ( Y ) ;\
|
|
|
61 |
( X )->label = ( Z ) ;\
|
|
|
62 |
( X )->dtors = NULL ;\
|
|
|
63 |
( X )->next = __TCPPLUS_except.buf [0] ;\
|
|
|
64 |
__TCPPLUS_except.buf [0] = ( X ) ;\
|
|
|
65 |
}
|
|
|
66 |
|
|
|
67 |
#define try_end( X )\
|
|
|
68 |
{\
|
|
|
69 |
__TCPPLUS_except.buf [0] = ( X )->next ;\
|
|
|
70 |
}
|