EGL defines the following
core Exception records for you. Additional Exception
records are defined for various data access technologies; see "Related
reference"
at the end of the topic for those that you might be using.
In
addition, your code can check for "AnyException", which will catch
any
of the exceptions below, as in the following example:
try
get myCustomer;
onException(ex AnyException)
myErrorHandler(ex);
end
The following fields are automatically predefined
for all the following
exceptions:
- messageID
- A STRING containing
the EGL error code for the exception.
- message
- A STRING containing a brief explanation of the problem.
The following exceptions are part of the core
EGL functionality:
- FileIOException
- An error
occurred while attempting to read or write to an indexed, relative,
or serial file. The record includes the additional implicit field:
- filename
- The name of the file being accessed
when the error occurred.
- IndexOutOfBoundsException
- Thrown in any situation where an index has a value out of bounds
of the
current context. This typically occurs on array access, substring
expressions,
and some system functions. The record includes this additional implicit
field:
- indexValue
- The value that was out of
bounds.
- InvocationException
- Thrown on call statements that cannot
invoke
a remote program. The error code explains the reason EGL cannot call
the
program. The record includes this additional field:
- name
- The name of the program that cannot be invoked.
- returnValue
- Stores the return code of the called
function, or zero if the InvocationException
was caused by other means.
- errno
- Provides
access to this C standard library value, set by service programs
and shared libraries. This value is only set when returnValue is
non-zero.
- JavaObjectException
- EGL exception thrown when a Java™ exception
is thrown in a Java object
that the program is accessing by means of an ExternalType part. See ExternalType part.
- LobProcessingException
- Identifies an error that
occurred during processing of a variable of type
BLOB or CLOB. The record includes these additional fields:
- itemName
- The name of the variable.
- operation
- The name of the EGL system function that cannot
be processed.
- resource
- The name
of the file (if any) attached to the variable.
- NullValueException
- Thrown any time
reference to a null value is made.
- RuntimeException
- Thrown when platform errors occur. The messageID field
contains the platform error code. The message field
contains the associated message if one can be obtained. If not, you
can use
the messageID to determine the platform
or EGL facility
that failed and look up the appropriate message in the given facilities
documentation.
- ServiceBindingException
- Thrown when the wrong binding is specified in the deployment descriptor
file.
- ServiceInvocationException
- Thrown
when EGL cannot invoke the requested service. In the case of native
services, the exception is also thrown when the return code does not
equal
zero. The record includes the following additional fields:
- source
- EGL, NATIVE, or WEB, depending on the type of
service invocation.
- detail1
- If
the source field is set to WEB, the value
here is the "FaultCode" value of the SOAP fault. If the source is
set to EGL or NATIVE, the detail1 field
is blank.
- detail2
- If the source field
is set to WEB, the value
here is the "SOAPActor" value of the SOAP fault. If the source is
set to EGL or NATIVE, the detail2 field
is blank.
- detail3
- If the source field
is set to WEB, the value
here is the "Diagnostic" value of the SOAP fault. If the source is
set to EGL or NATIVE, the detail3 field
is blank.
- TypeCastException
- This exception supports the as operator.
It
is thrown if the value being cast is not of the type specified by
the as operator.
The record includes the additional fields:
- castToName
- The type named by the as operator.
- actualTypeName
- The type name of the
value cast.