3 // These are all of the exceptions that derive from SystemException,
4 // which can implicitly be thrown from any method.
7 // exp: explanation string, may be NULL
8 // param: index (starting from 0) of the parameter which is causing
9 // the problem, or -1 if unspecified. This should only be
10 // specified for parameters of IDL methods; if thrown from a
11 // language function/method which does not know the relevant
12 // parameter in the IDL method, it should use an explanation
13 // string instead (and not use the index of its own parameter).
17 // The base Exception struct; all exceptions derive from this.
18 struct Exception virtual {
19 guid: "D88F50D2-2877-11DA-84AD-00112431A05E";
21 // The previous exception frame (i.e. that which threw this one),
22 // or null for the original exception frame. Linkage shall be
23 // preserved whenever an exception is either propagated or
24 // raised within an exception handling block.
28 // Object and method of the thrower of this frame, if it was rethrown
29 // due to crossing an IDL method boundary. Otherwise, both fields are
33 // Method method; // Fix throw_idl when this is uncommented.
35 // Language and machine specific information about whence an exception
38 ExceptionOriginInfo origin;
41 struct ExceptionOriginInfo virtual {
42 guid: "DBCF8333-2877-11DA-B66E-00112431A05E";
45 // This struct, or one derived from it, shall be used for an
46 // exception's origin field if it is from native code (and
47 // thus can refer to instructions by machine address).
49 struct NativeCodeExceptionOriginInfo : ExceptionOriginInfo {
50 guid: "E1B3FAC6-2877-11DA-8493-00112431A05E";
52 // Address of the faulting or throwing instruction
58 struct SystemException : Exception {
59 guid: "E5204D31-2877-11DA-A833-00112431A05E";
62 // Exception was thrown by the kernel. This bit is stripped when
63 // the exception passes through the ORB. It can be used to verify
64 // that MemoryFault and similar exceptions refer to an actual fault
65 // of the current address space when deciding whether to abort the
70 // Exception was generated automatically by the ORB, rather than
71 // thrown by a method. Some types of exceptions have fixed
72 // explanation string formats (and possibly other field usages) for
73 // ORB generated exceptions, but a free form explanation field for
74 // method-thrown exceptions.
81 // The MemoryFault exception indicates that the throwing method
82 // attempted to perform an invalid memory access, and the MemoryFault
83 // trap was not handled by the faulting process.
85 struct MemoryFault : SystemException {
86 guid: "EAA266EC-2877-11DA-9C5D-00112431A05E";
88 // Address that the method tried to access
91 // Address of the faulting instruction
94 // Process of faulting method
97 // Architecture specific data
101 // The fault occured on a memory load
104 // The fault occured on a memory store
107 // The fault occured on an instruction fetch
112 // The faulting address was not mapped
115 // The requested operation was prohibited
118 // An I/O error occured accessing a memory mapped region, or an
119 // uncorrectable memory error was encountered.
124 struct ArchMemoryFault virtual
126 guid: "EF25EED2-2877-11DA-83EF-00112431A05E";
129 // The OutOfMemory exception indicates that insufficient physical memory
130 // is available to perform the requested operation, including implicit
131 // allocations of memory such as memory mapped accesses, shared copy on
132 // write regions, and zero pages (though implicit allocation failures
133 // cannot happen unless overcommit is enabled). This exception is only
134 // thrown after a System.Traps.ReduceMemoryUsage trap has been delivered
135 // and failed to free sufficient memory.
137 struct OutOfMemory : SystemException {
138 guid: "F21A198C-2877-11DA-92DB-00112431A05E";
141 // Like OutOfMemory, but indicates that disk space, virtual
142 // address space, etc. has been exhausted.
144 struct OutOfSpace : SystemException {
145 guid: "6267B5C2-D2E4-11DA-831C-00112431A05E";
146 char[] exp immutable;
149 // Like OutOfSpace, but indicates that a specific requested resource
150 // (such as an IRQ number or network port) is already in use. Use
151 // OutOfSpace instead for resources that are allocated rather than
154 struct ResourceBusy : SystemException {
155 guid: "0EFB88FC-2878-11DA-AEB9-00112431A05E";
157 int param; // Index of parameter with problem, or -1 if
158 // unspecified, or if not due to a bad param.
159 char[] exp immutable;
162 /* The InstrFault exception indicates that the throwing method tried
163 to execute an invalid or privileged instruction, and the
164 InstrFault trap was not handled by the faulting process. */
166 struct InstrFault : SystemException {
167 guid: "F5CAE5F8-2877-11DA-BB6C-00112431A05E";
169 // Address of the faulting instruction
172 // Process of faulting method
175 // Architecture specific data
179 struct ArchInstrFault virtual
181 guid: "F9CE2A55-2877-11DA-9C92-00112431A05E";
187 // The TokenFault exception indicates that the caller does not
188 // currently have the necessary token to complete the requested method.
190 struct TokenFault : SystemException {
191 guid: "011B018D-2878-11DA-9F80-00112431A05E";
193 Token token; // Token that is required but not present
196 Thrown, // The TokenFault was explicitly thrown by a
198 Call, // The token was required for a method call
199 Open, // The token was required to obtain a handle on
204 restartable:1 // The method may be restarted if the requested
205 // token is acquired. Any TokenFaults with this
206 // flag set are handled in a transparent manner,
207 // by either acquiring the token and retrying or
208 // clearing the bit and propagating. Any method
209 // that throws a restartable TokenFault must
210 // be cleanly restartable with no side effects.
213 // For Call and Open, this is the object associated with the prohibited
214 // operation. Explicitly thrown token faults may optionally use this
219 // For Call, this is the method that could not be called. Explicitly
220 // thrown token faults may optionally use this field.
222 // Method method; // Fix throw_idl when this is uncommented.
224 char[] exp immutable;
227 // InvalidArgument may be thrown when an argument or combination
228 // of arguments is invalid.
230 struct InvalidArgument : SystemException {
231 guid: "04865176-2878-11DA-9F87-00112431A05E";
233 int param; // Index of problematic parameter, counting from 0,
234 // or -1 if not specified.
235 char[] exp immutable;
238 // GeneralFailure, as the name implies, is a general purpose exception
239 // to indicate failure conditions not covered by existing exceptions.
240 // It is generally preferable to define a specific exception for
241 // forseeable causes of failure.
243 struct GeneralFailure : SystemException {
244 guid: "094C37A1-2878-11DA-914D-00112431A05E";
246 char[] exp immutable;
249 // InvalidState is thrown when a method is called on an object which
250 // is not in a state in which the operation is meaningful.
252 struct InvalidState : SystemException {
253 guid: "0C361FFF-2878-11DA-ABC1-00112431A05E";
255 char[] exp immutable;
259 struct OperationNotSupported : SystemException {
260 guid: "119C274E-2878-11DA-B3B2-00112431A05E";
262 char[] exp immutable;
265 // InvalidReference is thrown when a method is called on a reference
266 // that no longer points to a valid object, or if such a dangling
267 // reference is found in the method's parameters.
269 struct InvalidReference : SystemException {
270 guid: "16E5E64F-2878-11DA-916E-00112431A05E";
272 int param; // Index of parameter with problem, or -1 if the method
273 // was invoked on a dangling reference. If the invalid
274 // reference is in the object's internal state, then
275 // InvalidState should be thrown instead.
277 char[] exp immutable;
278 // When thrown by the ORB, NULL if param is -1 or if the
279 // dangling reference was passed directly as a parameter.
280 // If, however, the dangling reference was in a struct,
281 // this provides the path to the bad parameter (e.g. if
282 // the third parameter of a method is a struct with a
283 // member "foo", and "foo" is a struct with a member
284 // "bar", and bar is a dangling object reference, exp will
285 // contain "foo.bar").
287 // When not thrown by the ORB, this is a free form
288 // explanation field (and may be NULL).
291 // Thrown when more references are attempted to be dropped than exist.
292 // "refs" is the number of references, and "released" is the number
293 // of releases asked for.
295 struct RefCountException : SystemException {
296 guid: "1EEDC277-9D71-415E-AA8D-19C52FDB72F2";