Progress
Open Client
Developer’s Guide


Handling Errors

Java clients handle errors by catching Exceptions. To enable Java proxies to throw Exceptions, Progress establishes two Exception class hierarchies:

In addition to the standard methods provided by java.lang.exception to get the message string, Progress provides the following method to obtain the error number:

SYNTAX
long getMessageID() 

For information about additional methods provided by these Exception classes, see the Open Client Toolkit documentation in Progress-Install-Directory/java/doc.

The following sections describe each Exception class in detail.

General 4GL Exceptions

Table 5–8 shows the general 4GL Exception classes. The left column lists each Exception class and its position in the class hierarchy. The arrows illustrate this hierarchy. For example, RunTime4GLException is the super-class of several Exception classes such as RunTime4GLStopException.

Table 5–8: General 4GL Exceptions For Java Proxies
Exception Class Hierarchy
(Top Bottom)

Description
Open4GLException
The root Exception for all Open Client errors. Used for miscellaneous client-side errors.
ConnectException
Error connecting to AppServer.
HostUnknownException
Invalid NameServer host specified in the URL.
InvalidNameServerPortException
Invalid NameServer port specified in the URL.
MsgVersionInvalidException
Incorrect version for message received from NameServer.
NameServerCommunicationsException
NameServer communications error. The message contains the specified reason for the failure.
NameServerInterruptException
NameServer communications broken. Either no response was received from the NameServer or the thread was interrupted before the response was received.
NoSuchAppServiceException
Application Service specified in URL unknown to NameServer.
NameServerMessageFormatException
Invalid format for message received from NameServer.
BadUrlException
Invalid URL format in connection parameter.
ConnectFailedException
Failed AppServer connection attempt. The message contains the specified reason for the failure.
RunTime4GLException
4GL run-time errors
RunTime4GLErrorException
4GL ERROR condition
RunTime4GLStopException
4GL STOP condition
RunTime4GLQuitException
4GL QUIT condition
BusySessionException
AppServer busy servicing another request
OutputSetException
Output result set error, for example, trying to get a column value out of column order or trying to make an illegal type conversion
SystemErrorException
An unexpected error that indicates a Progress bug or an unusual environmental problem (such as running out of disk space)

Output Result Set Exceptions

Progress defines ProSQLException which is returned from all methods on an output TEMP-TABLE result set, including the SDOResultSet object:

ProSQLException class extends java.sql.SQLException 

ProSQLException adds a method, getProException(), which returns an OutputSetException.

The SDOResultSet is an interface that maps to Progress SmartDataObjects running on the AppServer. For more information on SDOResultSet objects and how to handle Exceptions for them, see Using SmartDataObjects From Java Clients."


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095