Public Member Functions | |
HDException (Exception originalException) | |
HDException constructor wrapping underlying exception. | |
HDException (Exception originalException, String msg) | |
HDException constructor wrapping underlying exception. | |
HDException (String message, String data) | |
HDException constructor when no underlying exception thrown. | |
HDException (String message) | |
HDException constructor from a string. | |
HDException () | |
HDException default constructor. | |
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 |
Definition at line 13 of file HDException.java.
HDException | ( | Exception | originalException | ) |
HDException constructor wrapping underlying exception.
originalException |
Definition at line 22 of file HDException.java.
00022 { 00023 super(originalException.getMessage()); 00024 this.originalException = originalException; 00025 }
HDException | ( | Exception | originalException, | |
String | msg | |||
) |
HDException constructor wrapping underlying exception.
originalException | ||
msg |
Definition at line 33 of file HDException.java.
00033 { 00034 super(msg + " " + originalException.getMessage()); 00035 this.originalException = originalException; 00036 }
HDException | ( | String | message, | |
String | data | |||
) |
HDException constructor when no underlying exception thrown.
message | ||
data | useful in debugging this error |
Definition at line 44 of file HDException.java.
HDException | ( | String | message | ) |
HDException constructor from a string.
message |
Definition at line 54 of file HDException.java.
HDException | ( | ) |
void printStackTrace | ( | PrintWriter | printWriter | ) |
This prints the original exception stack trace, if there is one.
The message and stack trace can be obtained from it.
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 | ) |
This prints the original exception stack trace, if there is one.
The message and stack trace can be obtained from it.
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 | ( | ) |
Shows the sql error details (if relevant), and error data (if supplied).
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 | ( | ) |
gets the original exception this exception wraps
Definition at line 124 of file HDException.java.