org.openmms.util
Class OpenMMSException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.openmms.util.OpenMMSException
All Implemented Interfaces:
java.io.Serializable

public class OpenMMSException
extends java.lang.Exception

Title: OpenMMSException

Description: Processing Error Messages, and reassigning them as OpenMMS exceptions

Copyright: Copyright (c) 2003 OpenMMS.org

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
OpenMMSException(java.lang.String sErrorMessage)
          Constructor which sets the error description
OpenMMSException(java.lang.String sErrorMessage, java.lang.Throwable exception)
          Constructor which sets error description, and the exception being converted
OpenMMSException(java.lang.Throwable exception)
          Constructor which sets the exception being converted
 
Method Summary
 java.lang.Throwable getException()
          Returns the exception converted from, or null if not converted.
 java.lang.String getMessage()
          Designates the term OpenMMSException to the Error Message.
 void printStackTrace()
          Prints the stacktrace to System.err
 void printStackTrace(java.io.PrintStream out)
          Prints the stacktrace from either the original converted exception, prefixed with OpenMMSException, or the current exception.
 java.lang.String toString()
          Returns the Error Message as a new string.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpenMMSException

public OpenMMSException(java.lang.String sErrorMessage)
Constructor which sets the error description

Parameters:
sErrorMessage -

OpenMMSException

public OpenMMSException(java.lang.String sErrorMessage,
                        java.lang.Throwable exception)
Constructor which sets error description, and the exception being converted

Parameters:
sErrorMessage -
exception -

OpenMMSException

public OpenMMSException(java.lang.Throwable exception)
Constructor which sets the exception being converted

Parameters:
exception - original converted exception
Method Detail

getException

public java.lang.Throwable getException()
Returns the exception converted from, or null if not converted.

Returns:
original exception or null

printStackTrace

public void printStackTrace()
Prints the stacktrace to System.err

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream out)
Prints the stacktrace from either the original converted exception, prefixed with OpenMMSException, or the current exception. The stream to which it writes is locked before use.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
out -

getMessage

public java.lang.String getMessage()
Designates the term OpenMMSException to the Error Message.

Overrides:
getMessage in class java.lang.Throwable
Returns:
error description

toString

public java.lang.String toString()
Returns the Error Message as a new string.

Overrides:
toString in class java.lang.Throwable
Returns:
error description