All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.utils.XMLMiddlewareException

java.lang.Object
   |
   +----java.lang.Throwable
           |
           +----java.lang.Exception
                   |
                   +----org.xmlmiddleware.utils.XMLMiddlewareException

public class XMLMiddlewareException
extends Exception

This class can encapsulate another Exception. The code is largely copied from SAXException, by David Megginson.

Version:
2.0
Author:
Ronald Bourret, 2001

Constructor Index

 o XMLMiddlewareException(Exception)
Create a new XMLMiddlewareException wrapping an existing exception.
 o XMLMiddlewareException(String)
Create a new XMLMiddlewareException.
 o XMLMiddlewareException(String, Exception)
Create a new XMLMiddlewareException from an existing exception.

Method Index

 o getException()
Return the embedded exception, if any.
 o getMessage()
Return a detail message for this exception.
 o toString()
Override toString to pick up any embedded exception.

Constructors

 o XMLMiddlewareException
 public XMLMiddlewareException(String message)
Create a new XMLMiddlewareException.

Parameters:
message - The error or warning message.
 o XMLMiddlewareException
 public XMLMiddlewareException(Exception e)
Create a new XMLMiddlewareException wrapping an existing exception.

The existing exception will be embedded in the new one, and its message will become the default message for the XMLMiddlewareException.

Parameters:
e - The exception to be wrapped in a XMLMiddlewareException.
 o XMLMiddlewareException
 public XMLMiddlewareException(String message,
                               Exception e)
Create a new XMLMiddlewareException from an existing exception.

The existing exception will be embedded in the new one, but the new exception will have its own message.

Parameters:
message - The detail message.
e - The exception to be wrapped in a XMLMiddlewareException.

Methods

 o getMessage
 public String getMessage()
Return a detail message for this exception.

If there is an embedded exception, and if the XMLMiddlewareException has no detail message of its own, this method will return the detail message from the embedded exception.

Returns:
The error or warning message.
Overrides:
getMessage in class Throwable
 o getException
 public Exception getException()
Return the embedded exception, if any.

Returns:
The embedded exception, or null if there is none.
 o toString
 public String toString()
Override toString to pick up any embedded exception.

Returns:
A string representation of this exception.
Overrides:
toString in class Throwable

All Packages  Class Hierarchy  This Package  Previous  Next  Index