Runtime components : Core components : Exceptions
  
Exceptions
UNICOM® Digital Transformation Toolkit (UDTT™) follows the standard Java mechanism for exception handling, but incorporates some additional behavior to facilitate how applications can access exception information. Each component defines and manages the toolkit and standard Java exceptions that it can raise.
An exception class named DSEException (subclassed from java.lang.Exception and found in the com.ibm.dse.base package), is the parent for every non-runtime exception defined in the toolkit.
For runtime exception, UDTT provides an exception class named DSERuntimeException (subclassed from java.lang.RuntimeException) as the base of every runtime exception defined in the toolkit.
In addition to the default String message inherited from java.lang.Exception, DSEException has the following attributes, which provide more information to the receiver of the exception:
Severity (critical or harmless)
Code (defined by each component to discriminate types of errors or warnings in the exception)
Name of the class raising the exception
Name of the method raising the exception
The constructor for DSEException sets these attributes and the string error message. The constructor, DSEException(String severity, String code, String message), must be called by the constructor of each defined exception.
Names of exceptions defined in the toolkit start with DSE and end with Exception. In addition to this naming convention, an exception name includes an identifier if it is defined for a specific component and must be differentiated from exceptions used by other components (for example, DSECSSessionNotEstablishedException for a client/server defined exception).
An exception is created in the package of the component that raises it, unless it is thrown by different components defined in different packages, in which case it is defined in the package com.ibm.btt.base.
New exceptions are created only when no Java standard exception exists for the error or warning that is required.
See
Base rules for handling exceptions
Base and predefined UDTT exceptions
Custom exception handling
Go up to
Core components