beautypg.com

Applicationexception class – HP NonStop G-Series User Manual

Page 136

background image

Is one of the TUXEDO errors (e.g.,
TPENOENT)

Is the text message from tpstrerror().

TPEJOLT

Provides useful information about what
error has occurred and its location. You
can use a getErrno to get the error number
and a getMessage to obtain the error
message for the exception object.

The Jolt Class Library uses exceptions to report run-time problems. All Jolt exceptions extend from
Java's RuntimeException and Error classes.

Figure A-1

illustrates the relationship of the JoltException

classes to the Java RuntimeException class.

Figure A-1. Jolt Exception Class Hierarchy

Because Java's RuntimeException and Error conditions are caught automatically by the Java virtual
machine (VM), programmers can ignore these and rely on the Java VM to trap them. However,
programmers must catch the exceptions or errors that are important to their particular applications so
that application-specific recovery can be initiated.

ApplicationException Class

java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.ApplicationException

The ApplicationException class is used by the JoltRemoteService class and its methods. The