HDUnitException Class Reference

HepData exception relating to Unit conversions and other wranglings. More...

Inheritance diagram for HDUnitException:

Inheritance graph
[legend]

Collaboration diagram for HDUnitException:

Collaboration graph
[legend]

List of all members.


Public Member Functions

 HDUnitException ()
 HDUnitException (Exception exception)
 HDUnitException (String description)
void printStackTrace (PrintWriter printWriter)
 This prints the original exception stack trace, if there is one.
void printStackTrace (PrintStream printStream)
 This prints the original exception stack trace, if there is one.
String getMessage ()
 Shows the sql error details (if relevant), and error data (if supplied).
Exception getOriginalException ()
 gets the original exception this exception wraps

Detailed Description

HepData exception relating to Unit conversions and other wranglings.

Author:
Andy Buckley
Version:
Date
2006-02-02 15:01:18 +0000 (Thu, 02 Feb 2006)
Revision
492

Definition at line 9 of file HDUnitException.java.


Constructor & Destructor Documentation

HDUnitException (  ) 

Definition at line 10 of file HDUnitException.java.

00010 { super(); }

HDUnitException ( Exception  exception  ) 

Definition at line 11 of file HDUnitException.java.

00011 { super(exception); }

HDUnitException ( String  description  ) 

Definition at line 12 of file HDUnitException.java.

00012 { super(description); }


Member Function Documentation

void printStackTrace ( PrintWriter  printWriter  )  [inherited]

This prints the original exception stack trace, if there is one.

The message and stack trace can be obtained from it.

Parameters:
printWriter 

Definition at line 71 of file HDException.java.

00071                                                          {
00072         if (originalException != null) {
00073             originalException.printStackTrace(printWriter);
00074         } else {
00075             super.printStackTrace(printWriter);
00076         }
00077     }

void printStackTrace ( PrintStream  printStream  )  [inherited]

This prints the original exception stack trace, if there is one.

The message and stack trace can be obtained from it.

Parameters:
printStream 

Definition at line 85 of file HDException.java.

00085                                                          {
00086         if (originalException != null) {
00087             originalException.printStackTrace(printStream);
00088         } else {
00089             super.printStackTrace(printStream);
00090         }
00091     }

String getMessage (  )  [inherited]

Shows the sql error details (if relevant), and error data (if supplied).

Returns:
error message

Definition at line 99 of file HDException.java.

00099                                {
00100         StringBuffer b = new StringBuffer();
00101 
00102         //b.append(this.getClass().getName());
00103         //b.append("\n");
00104         b.append(super.getMessage());
00105 
00106         //if (originalException!=null){a
00107         //    b.append("\n Original Exception\n");
00108         //    b.append(originalException.getClass().getName());
00109         //  }
00110         //printStackTrace(System.out);
00111         if (data != "") {
00112             b.append(":DATA:");
00113             b.append(data);
00114         }
00115 
00116         return b.toString();
00117     }

Exception getOriginalException (  )  [inherited]

gets the original exception this exception wraps

Returns:
exception

Definition at line 124 of file HDException.java.

00124                                             {
00125         return originalException;
00126     }


The documentation for this class was generated from the following file:


Generated on Tue Apr 21 15:54:56 2009 for HepData common classes by  doxygen 1.5.5