beautypg.com

Joltexception class, Applicationexception methods, Getmessage – HP NonStop G-Series User Manual

Page 137: Getapplicationcode, Getobject

background image

ApplicationException is thrown only when the service calls a tpreturn (TPFAIL, tpurcode, ...).

public class ApplicationException extends java.lang.RuntimeException

ApplicationException Methods

The following methods are used with the ApplicationException class.

getMessage

The getMessage method gets the error message.

public String getMessage();

Usage This method is taken from the Java RuntimeException class.

getApplicationCode

The getApplicationCode method gets the application code (tpurcode).

public int getApplicationCode();

getObject

The getObject method gets the object that throws this exception.

public Object getObject();

Usage In Jolt 1.1, the object retrieved by getObject is an instance of the JoltRemoteService class. The
caller can still use this object to retrieve all the output parameters. See getStringDef() or similar
methods in JoltRemoteService class.

JoltException Class

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

All Jolt exceptions are derived from the Java RuntimeException class. The Java virtual machine
catches them by default, thus the programmer is not required to catch any of these exceptions.

public class JoltException extends java.lang.RuntimeException
{