NonStop JMS C++ API Programmer's Guide

NonStop Server for Java Message Service C++ API Programmer’s Guide526459-002
A-1
A Error Reporting and Messages
This appendix provides information about JMS API error messages, the NSJMS C++
API logging facility, and the NSJMS C++ API exception types.
JMS API Error Messages
JMS API error messages and exceptions are described in the Sun Microsystems
published specification, Java Message Service, Version 1.0.2. The specification is
available on the Sun Microsystems Java Message Service (JMS) web site
(http://java.sun.com/products/jms/docs.html)).
NSJMS C++ API Logging Facility
All log records generated by the NSJMS C++ API are contained in the
nsjmscapi.log file. The type of records generated by the NSJMS C++ API is
determined by the Logger.loglevel setting in the nsjms.properties file. For a
description of the level of records that can be generated and reported to the
nsjmscapi.log file, see Logger.loglevel on page 8-3 or the NonStop Server for Java
Message Service User’s Manual. Client programs should be written to catch the
exceptions and handle them appropriately. If an exception is not handled, the default
behavior is termination of the program.
NSJMS C++ API Exception Types
Exception types are thrown when error conditions occur. The following exception types
are defined by the NSJMS C++ API.
NSJMS_Exception
NSJMS_Exception is the base class of all exception classes. It includes the following
access methods to retrieve messages and codes for exception types.
int getErrorCode();
char * getMessage();
Additionally, NSJMS_Exception also includes these methods:
void setLinkedException(exception *);
which adds a linked exception.
exception* getLinkedException();
which gets the exception linked to this exception.
char* getClassName();
which returns the name of the exception subclass.