Kbase P116414: Adapter for SonicMQ: Error and condition handling with the 4GL-JMS API
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  30/05/2006 |
|
Status: Unverified
GOAL:
How to trap synchronous errors reported by the 4GL-JMS API
GOAL:
How to trap Asynchronous errors reported by the 4GL-JMS API
GOAL:
How to Implement Error and Condition Handling for 4GL-JMS API calls
FACT(s) (Environment):
SonicMQ
Progress 9.x
OpenEdge 10.x
FIX:
In a typical deployed environment, a 4GL application that makes calls to the 4GL-JMS API should trap for Synchronous and Asynchronous runtime errors or conditions.
Synchronous runtime errors or conditions:
The 4GL-JMS API reports synchronous run time errors or conditions with a call to:
RETURN ERROR <error message>.
This call raises an error condition at the caller. The caller can use regular 4GL techniques to handle the error: a NO?ERROR phrase or an ON ERROR block, coupled with checking the RETURN?VALUE value to obtain the error message. If an application uses the NO?ERROR phrase, it must check the STATUS?ERROR:ERROR flag to determine whether a problem has occurred.
Asynchronous runtime errors or conditions:
The 4GL-JMS API reports asynchronous run time errors or conditions through the 4GL-JMS Error handler. The application should handle problems of this type programmatically by creating a Message Consumer object and passing it to the setErrorHandler procedure in the Session object.