/[eiffelstudio]/vendor/gobosoft.com/gobo/4.0d/tool/gec/runtime/c/eif_except.h
ViewVC logotype

Contents of /vendor/gobosoft.com/gobo/4.0d/tool/gec/runtime/c/eif_except.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 98698 - (show annotations)
Mon May 9 13:53:54 2016 UTC (3 years, 5 months ago) by manus
File MIME type: text/plain
File size: 3993 byte(s)
Update 4.0d version with changes in Gobo from 2016/05/09

1 /*
2 description:
3
4 "C functions used to implement class EXCEPTIONS"
5
6 system: "Gobo Eiffel Compiler"
7 copyright: "Copyright (c) 2006-2016, Eric Bezault and others"
8 license: "MIT License"
9 date: "$Date$"
10 revision: "$Revision$"
11 */
12
13 #ifndef EIF_EXCEPT_H
14 #define EIF_EXCEPT_H
15 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
16 #pragma once
17 #endif
18
19 #ifndef GE_EXCEPTION_H
20 #include "ge_exception.h"
21 #endif
22 #include <errno.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /*
29 * Predefined exception codes.
30 */
31 #define EN_VOID GE_EX_VOID /* Feature applied to void reference */
32 #define EN_MEM GE_EX_MEM /* No more memory */
33 #define EN_PRE GE_EX_PRE /* Pre-condition violated */
34 #define EN_POST GE_EX_POST /* Post-condition violated */
35 #define EN_FLOAT GE_EX_FLOAT /* Floating point exception (signal SIGFPE) */
36 #define EN_CINV GE_EX_CINV /* Class invariant violated */
37 #define EN_CHECK GE_EX_CHECK /* Assertion violated */
38 #define EN_FAIL GE_EX_FAIL /* Routine failure */
39 #define EN_WHEN GE_EX_WHEN /* Unmatched inspect value */
40 #define EN_VAR GE_EX_VAR /* Non-decreasing loop variant */
41 #define EN_LINV GE_EX_LINV /* Loop invariant violated */
42 #define EN_SIG GE_EX_SIG /* Operating system signal */
43 #define EN_BYE GE_EX_BYE /* Eiffel run-time panic */
44 #define EN_RESC GE_EX_RESC /* Exception in rescue clause */
45 #define EN_OMEM GE_EX_OMEM /* Out of memory (cannot be ignored) */
46 #define EN_RES GE_EX_RES /* Resumption failed (retry did not succeed) */
47 #define EN_CDEF GE_EX_CDEF /* Create on deferred */
48 #define EN_EXT GE_EX_EXT /* External event */
49 #define EN_VEXP GE_EX_VEXP /* Void assigned to expanded */
50 #define EN_HDLR GE_EX_HDLR /* Exception in signal handler */
51 #define EN_IO GE_EX_IO /* I/O error */
52 #define EN_SYS GE_EX_SYS /* Operating system error */
53 #define EN_RETR GE_EX_RETR /* Retrieval error */
54 #define EN_PROG GE_EX_PROG /* Developer exception */
55 #define EN_FATAL GE_EX_FATAL /* Eiffel run-time fatal error */
56 #define EN_DOL GE_EX_DOL /* $ applied to melted feature */
57 #define EN_ISE_IO GE_EX_ISE_IO /* I/O error raised by the ISE Eiffel runtime */
58 #define EN_COM GE_EX_COM /* COM error raised by EiffelCOM runtime */
59 #define EN_RT_CHECK GE_EX_RT_CHECK /* Runtime check error such as out-of-bound array access */
60 #define EN_OLD GE_EX_OLD /* Old violation */
61 #define EN_SEL GE_EX_SEL /* Serialization failure */
62 #define EN_DIRTY GE_EX_DIRTY /* SCOOP processor dirty exception. */
63 #define EN_NEX GE_EX_NEX /* Number of internal exceptions */
64
65 /*
66 * Raise an Eiffel exception.
67 */
68 extern void eraise(const char* name, long code);
69
70 /*
71 * Raise an Eiffel exception of the given code with no associated tag.
72 */
73 extern void xraise(int code);
74
75 /*
76 * Raise an "Operating system error" exception.
77 */
78 extern void esys(void);
79
80 /*
81 * As a special case, an I/O error is raised when a system call which is I/O bound fails.
82 */
83 extern void eise_io(const char* tag);
84
85 /*
86 * Raise a "No more memory" exception.
87 */
88 extern void enomem(void);
89
90 /*
91 * Raise EiffelCOM exception.
92 */
93 extern void com_eraise(const char* tag, long num);
94
95 /*
96 * Terminate execution with exit status `code',
97 * without triggering an exception.
98 */
99 extern void esdie(int code);
100
101 /*
102 * Exception tag associated with `code'.
103 * This is a duplication from Eiffel classes, but still used for trace printing and in EiffelCom.
104 */
105 extern EIF_REFERENCE eename(long except);
106
107 /*
108 * Is exception `ex' defined?
109 * Used in EiffelCOM.
110 */
111 extern char eedefined(long ex);
112
113 /*
114 * Enable/diable printing of the exception trace.
115 * Per thead information.
116 */
117 extern void eetrace(char b);
118
119 /*
120 * Is current execution during rescue?
121 */
122 extern EIF_BOOLEAN eif_is_in_rescue(void);
123
124 #ifdef EIF_WINDOWS
125 /*
126 * Set default exception handler.
127 */
128 extern void set_windows_exception_filter();
129 #endif
130
131 /*
132 * Used in EiffelCOM.
133 */
134 #define echval GE_current_context()->exception_code
135 #define echtg GE_current_context()->exception_tag
136
137 #ifdef __cplusplus
138 }
139 #endif
140
141 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23