com.simonstl.moe
Class MOEException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.simonstl.moe.MOEException
All Implemented Interfaces:
java.io.Serializable

public class MOEException
extends java.lang.Exception

The MOEException class is a very light rewriting of the public domain org.xml.SAXException class, though more changes will appear over time.

version 0.01 is the initial release and contains plenty of bogus placeholder functionality.

Version:
0.01 26 August 2001
Author:
Simon St.Laurent
See Also:
Serialized Form

Constructor Summary
MOEException(java.lang.Exception e)
          Create a new MOEException wrapping an existing exception.
MOEException(java.lang.String message)
          Create a new MOEException.
MOEException(java.lang.String message, java.lang.Exception e)
          Create a new MOEException from an existing exception.
 
Method Summary
 java.lang.Exception getException()
          Return the embedded exception, if any.
 java.lang.String getMessage()
          Return a detail message for this exception.
 void printStackTrace()
          Overrides Throwable.printStackTrace to recursively display stack trace of nested exceptions
 void printStackTrace(java.io.PrintStream stream)
          Overrides Throwable.printStackTrace to recursively display stack trace of nested exceptions
 void printStackTrace(java.io.PrintWriter writer)
          Overrides Throwable.printStackTrace to recursively display stack trace of nested exceptions
 java.lang.String toString()
          Override toString to pick up any embedded exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MOEException

public MOEException(java.lang.String message)
Create a new MOEException.
Parameters:
message - The error or warning message.

MOEException

public MOEException(java.lang.Exception e)
Create a new MOEException wrapping an existing exception.

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

Parameters:
e - The exception to be wrapped in a MOEException.

MOEException

public MOEException(java.lang.String message,
                    java.lang.Exception e)
Create a new MOEException 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 MOEException.
Method Detail

getMessage

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

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

Overrides:
getMessage in class java.lang.Throwable
Returns:
The error or warning message.

getException

public java.lang.Exception getException()
Return the embedded exception, if any.
Returns:
The embedded exception, or null if there is none.

toString

public java.lang.String toString()
Override toString to pick up any embedded exception.
Overrides:
toString in class java.lang.Throwable
Returns:
A string representation of this exception.

printStackTrace

public void printStackTrace(java.io.PrintWriter writer)
Overrides Throwable.printStackTrace to recursively display stack trace of nested exceptions
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Overrides Throwable.printStackTrace to recursively display stack trace of nested exceptions
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream stream)
Overrides Throwable.printStackTrace to recursively display stack trace of nested exceptions
Overrides:
printStackTrace in class java.lang.Throwable