hepdata is hosted by Hepforge, IPPP Durham

cedar.hepdata.util
Class HDException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by cedar.hepdata.util.HDException
All Implemented Interfaces:
java.io.Serializable

public class HDException
extends java.lang.Exception

Generic HepData exception: may be a wrapper round another exception.

Version:
$Date: 2006-02-02 15:01:18 +0000 (Thu, 02 Feb 2006) $ $Revision: 492 $
Author:
S. Butterworth
See Also:
Serialized Form

Constructor Summary
HDException(java.lang.Exception originalException)
          HDException constructor wrapping underlying exception.
HDException(java.lang.Exception originalException, java.lang.String msg)
          HDException constructor wrapping underlying exception.
HDException(java.lang.String message, java.lang.String data)
          HDException constructor when no underlying exception thrown.
 
Method Summary
 java.lang.String getMessage()
          Shows the sql error details (if relevant), and error data (if supplied)
 java.lang.Exception getOriginalException()
          gets the original exception this exception wraps
 void printStackTrace(java.io.PrintStream printStream)
          This prints the original exception stack trace, if there is one.
 void printStackTrace(java.io.PrintWriter printWriter)
          This prints the original exception stack trace, if there is one.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HDException

public HDException(java.lang.Exception originalException)
HDException constructor wrapping underlying exception.

Parameters:
originalException -


HDException

public HDException(java.lang.Exception originalException,
                   java.lang.String msg)
HDException constructor wrapping underlying exception.

Parameters:
originalException -
msg -


HDException

public HDException(java.lang.String message,
                   java.lang.String data)
HDException constructor when no underlying exception thrown.

Parameters:
message -
data - useful in debugging this error

Method Detail

printStackTrace

public void printStackTrace(java.io.PrintWriter printWriter)
This prints the original exception stack trace, if there is one. The message and stack trace can be obtained from it.

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


printStackTrace

public void printStackTrace(java.io.PrintStream printStream)
This prints the original exception stack trace, if there is one. The message and stack trace can be obtained from it.

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


getMessage

public java.lang.String getMessage()
Shows the sql error details (if relevant), and error data (if supplied)

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


getOriginalException

public java.lang.Exception getOriginalException()
gets the original exception this exception wraps

Returns:
exception


Generated 20060512 1623

HEPData