Definition at line 19 of file JetWebDBException.java.
Public Member Functions | |
JetWebDBException (SQLException originalException, String sql, String data) | |
JetWebDBException (String message, String data) | |
String | getMessage () |
void | printStackTrace (PrintWriter s) |
void | printStackTrace (PrintStream s) |
Exception | getOriginalException () |
Protected Attributes | |
String | data = "" |
Exception | originalException |
Private Attributes | |
String | sql = "" |
|
JetWebDBException constructor when SQL errors thrown.
Definition at line 31 of file JetWebDBException.java. 00031 { 00032 super(originalException); 00033 this.sql = sql; 00034 this.data = data; 00035 }
|
|
JetWebDBException constructor when no sql exception thrown.
Definition at line 43 of file JetWebDBException.java. 00043 { 00044 super(message, data); 00045 }
|
|
Overrides super to show the sql error details (if relevant), and error data (if supplied)
Reimplemented from JetWebException. Definition at line 53 of file JetWebDBException.java. References JetWebException.getOriginalException(), and JetWebDBException.sql. 00053 { 00054 StringBuffer b = new StringBuffer(); 00055 00056 if (getOriginalException() == null) { 00057 b.append(super.getMessage()); 00058 } else { 00059 b.append(((SQLException) getOriginalException()).getMessage()); 00060 b.append("\n:SQL:"); 00061 b.append(sql); 00062 b.append("\n:CODE:"); 00063 b.append(((SQLException) getOriginalException()).getErrorCode()); 00064 b.append("\n:STATE:"); 00065 b.append(((SQLException) getOriginalException()).getSQLState()); 00066 } 00067 00068 if (data != "") { 00069 b.append("\n:DATA:"); 00070 b.append(data); 00071 } 00072 00073 return b.toString(); 00074 }
|
|
gets the original exception this exception wraps
Definition at line 107 of file JetWebException.java. Referenced by JobRequestException.getMessage(), and JetWebDBException.getMessage(). 00107 {
00108 return originalException;
00109 }
|
|
This overrides super to print the original exception stack trace, if there is one. The message and stack trace can be obtained from it.
Definition at line 67 of file JetWebException.java. References JetWebException.originalException. 00067 { 00068 if (originalException!=null){ 00069 originalException.printStackTrace(s); 00070 } else { 00071 super.printStackTrace(s); 00072 } 00073 }
|
|
This overrides super to print the original exception stack trace, if there is one. The message and stack trace can be obtained from it.
Definition at line 54 of file JetWebException.java. References JetWebException.originalException. 00054 { 00055 if (originalException!=null){ 00056 originalException.printStackTrace(s); 00057 } else { 00058 super.printStackTrace(s); 00059 } 00060 }
|
|
Definition at line 16 of file JetWebException.java. Referenced by JetWebException.getMessage(). |
|
Definition at line 17 of file JetWebException.java. Referenced by JetWebException.getMessage(), and JetWebException.printStackTrace(). |
|
Definition at line 20 of file JetWebDBException.java. Referenced by JetWebDBException.getMessage(). |
Generated Wed Jan 17 09:14:27 GMT 2007