|
Arch4J 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--org.arch4j.core.BaseApplicationException
|
+--org.arch4j.dataaccess.DataAccessException
This class is a wrapper for SQLExceptions. It adds
an additional constructor that takes a SQLException, generates
an informative message string, and holds onto the original exception.
The method that generates the informative message is available for
any caller with a SQLException, via the static
getErrorString(SQLException) method.
| Field Summary |
| Fields inherited from class org.arch4j.core.BaseApplicationException |
nestedException |
| Constructor Summary | |
DataAccessException()
Constructs a DataAccessException with no specified
detail message or nested exception. |
|
DataAccessException(SQLException exception)
Constructs a DataAccessException with the specified
nested SQL exception. |
|
DataAccessException(String message)
Constructs a DataAccessException with the specified
detail message. |
|
DataAccessException(String message,
Throwable exception)
Constructs a DataAccessException with the specified
detail message and nested exception. |
|
DataAccessException(Throwable exception)
Constructs a DataAccessException with the specified
nested exception. |
|
| Method Summary | |
static String |
getErrorString(SQLException ex)
Creates an informative error string based on the given SQLException,
following the chain of additional exceptions (if any). |
| Methods inherited from class org.arch4j.core.BaseApplicationException |
getMessage, getNestedException, getStackTraceString, printStackTrace, printStackTrace, printStackTrace |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DataAccessException()
DataAccessException with no specified
detail message or nested exception.
public DataAccessException(String message)
DataAccessException with the specified
detail message.
message - The detailed message.public DataAccessException(Throwable exception)
DataAccessException with the specified
nested exception.
exception - The nested exception.public DataAccessException(SQLException exception)
DataAccessException with the specified
nested SQL exception. An informative error string is automatically
constructed.
exception - The nested SQL exception.getErrorString(SQLException)
public DataAccessException(String message,
Throwable exception)
DataAccessException with the specified
detail message and nested exception.
message - The detailed message.exception - The nested exception.| Method Detail |
public static String getErrorString(SQLException ex)
SQLException,
following the chain of additional exceptions (if any).
ex - The original SQLException.
String containing the exception's error information.
|
Arch4J 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||