| Modifier and Type | Field and Description |
|---|---|
| public static final String | HIDE_SQL
If the SQL statement contains this text, then it is never added to the SQL exception. |
| private static final Properties | |
| private static final DbException | |
| private static final long | |
| private Object | |
| public static final SQLException | SQL_OOME
Thrown when OOME exception happens on handle error
inside |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public DbException | |
| public static String | |
| public static DbException | |
| public static DbException | Returns: the database exception objectthe root cause te, String the added message or null message)Convert an InvocationTarget exception to a database exception. |
| public static DbException | Returns: the database exception objectthe root cause e, String the message or null message)Convert an IO exception to a database exception. |
| private static String | |
| public static DbException | |
| public static DbException | Returns: the exceptionthe error code errorCode)Create a database exception for a specific error code. |
| public static DbException | |
| public static DbException | |
| public static DbException | |
| public int | |
| public static DbException | Returns: the exceptionthe name of the database dataFileName)Gets a file version exception. |
| public static RuntimeException | |
| public static RuntimeException | |
| public static DbException | Returns: the exceptionthe name of the parameter param, Object the value passed value)Gets a SQL exception meaning this value is invalid. |
| public static DbException | Returns: the exceptionthe cause of the exception cause, String the name of the parameter param, Object the value passed value)Gets a SQL exception meaning this value is invalid. |
| public static SQLException | Returns: the SQLException objectthe error code errorCode)Gets the SQL exception object for a specific error code. |
| public static SQLException | Returns: the SQLException objectthe error code errorCode, String the first parameter of the message p1)Gets the SQL exception object for a specific error code. |
| public static SQLException | Returns: the SQLException objectthe error code errorCode, Throwable the cause of the exception cause, String... the list of parameters of the message params)Gets the SQL exception object for a specific error code. |
| public static SQLException | |
| public Object | |
| public SQLException | |
| public static DbException | Returns: the exceptionthe SQL statement sql, int the position of the error in the SQL statement index)Create a syntax error exception. |
| public static DbException | Returns: the exceptionthe SQL statement sql, int the position of the error in the SQL statement index, String the message message)Create a syntax error exception. |
| public static DbException | Returns: the exceptionthe error code errorCode, String the SQL statement sql, int the position of the error in the SQL statement index, String... the list of parameters of the message params)Create a syntax error exception for a specific error code. |
| public static DbException | Returns: the exceptionwhat exactly is not supported message)Gets a SQL exception meaning this feature is not supported. |
| public static DbException | Returns: the exceptioncolumn with data type or data type name columnOrType, String string representation of value, will be truncated to 80
characters value, long the actual length of value, valueLength)-1L if unknownGets a SQL exception meaning this value is too long. |
| public static void | printNextExceptions(SQLException
SQL exception e, PrintWriter print writer s)Prints up to 100 next exceptions for a specified SQL exception. |
| public static void | printNextExceptions(SQLException
SQL exception e, PrintStream print stream s)Prints up to 100 next exceptions for a specified SQL exception. |
| private static String | |
| public void | |
| public static SQLException | Returns: the SQL exception objectthe root cause e)Convert an exception to a SQL exception using the default mapping. |
| public static void | traceThrowable(Throwable
the exception e)Write the exception to the driver manager log writer if configured. |
| private static String |
| HIDE_SQL | back to summary |
|---|---|
| public static final String HIDE_SQL If the SQL statement contains this text, then it is never added to the SQL exception. Hiding the SQL statement may be important if it contains a passwords, such as a CREATE LINKED TABLE statement. | |
| MESSAGES | back to summary |
|---|---|
| private static final Properties MESSAGES | |
| OOME | back to summary |
|---|---|
| private static final DbException OOME | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| source | back to summary |
|---|---|
| private Object source | |
| SQL_OOME | back to summary |
|---|---|
| public static final SQLException SQL_OOME Thrown when OOME exception happens on handle error
inside | |
| DbException | back to summary |
|---|---|
| private DbException(SQLException e) | |
| addSQL | back to summary |
|---|---|
| public DbException addSQL(String sql) Set the SQL statement of the given exception. This method may create a new object.
| |
| buildMessageForException | back to summary |
|---|---|
| public static String buildMessageForException(JdbcException e) Builds message for an exception.
| |
| convert | back to summary |
|---|---|
| public static DbException convert(Throwable e) Convert a throwable to an SQL exception using the default mapping. All errors except the following are re-thrown: StackOverflowError, LinkageError.
| |
| convertInvocation | back to summary |
|---|---|
| public static DbException convertInvocation(InvocationTargetException te, String message) Convert an InvocationTarget exception to a database exception.
| |
| convertIOException | back to summary |
|---|---|
| public static DbException convertIOException(IOException e, String message) Convert an IO exception to a database exception.
| |
| filterSQL | back to summary |
|---|---|
| private static String filterSQL(String sql) | |
| fromUser | back to summary |
|---|---|
| public static DbException fromUser(String sqlstate, String message) Create a database exception for an arbitrary SQLState.
| |
| get | back to summary |
|---|---|
| public static DbException get(int errorCode) Create a database exception for a specific error code.
| |
| get | back to summary |
|---|---|
| public static DbException get(int errorCode, String p1) Create a database exception for a specific error code.
| |
| get | back to summary |
|---|---|
| public static DbException get(int errorCode, Throwable cause, String... params) Create a database exception for a specific error code.
| |
| get | back to summary |
|---|---|
| public static DbException get(int errorCode, String... params) Create a database exception for a specific error code.
| |
| getErrorCode | back to summary |
|---|---|
| public int getErrorCode() Get the error code.
| |
| getFileVersionError | back to summary |
|---|---|
| public static DbException getFileVersionError(String dataFileName) Gets a file version exception.
| |
| getInternalError | back to summary |
|---|---|
| public static RuntimeException getInternalError(String s) Gets an internal error.
| |
| getInternalError | back to summary |
|---|---|
| public static RuntimeException getInternalError() Gets an internal error.
| |
| getInvalidValueException | back to summary |
|---|---|
| public static DbException getInvalidValueException(String param, Object value) Gets a SQL exception meaning this value is invalid.
| |
| getInvalidValueException | back to summary |
|---|---|
| public static DbException getInvalidValueException(Throwable cause, String param, Object value) Gets a SQL exception meaning this value is invalid.
| |
| getJdbcSQLException | back to summary |
|---|---|
| public static SQLException getJdbcSQLException(int errorCode) Gets the SQL exception object for a specific error code.
| |
| getJdbcSQLException | back to summary |
|---|---|
| public static SQLException getJdbcSQLException(int errorCode, String p1) Gets the SQL exception object for a specific error code.
| |
| getJdbcSQLException | back to summary |
|---|---|
| public static SQLException getJdbcSQLException(int errorCode, Throwable cause, String... params) Gets the SQL exception object for a specific error code.
| |
| getJdbcSQLException | back to summary |
|---|---|
| public static SQLException getJdbcSQLException(String message, String sql, String state, int errorCode, Throwable cause, String stackTrace) Creates a SQLException. | |
| getSource | back to summary |
|---|---|
| public Object getSource() | |
| getSQLException | back to summary |
|---|---|
| public SQLException getSQLException() Get the SQLException object.
| |
| getSyntaxError | back to summary |
|---|---|
| public static DbException getSyntaxError(String sql, int index) Create a syntax error exception.
| |
| getSyntaxError | back to summary |
|---|---|
| public static DbException getSyntaxError(String sql, int index, String message) Create a syntax error exception.
| |
| getSyntaxError | back to summary |
|---|---|
| public static DbException getSyntaxError(int errorCode, String sql, int index, String... params) Create a syntax error exception for a specific error code.
| |
| getUnsupportedException | back to summary |
|---|---|
| public static DbException getUnsupportedException(String message) Gets a SQL exception meaning this feature is not supported.
| |
| getValueTooLongException | back to summary |
|---|---|
| public static DbException getValueTooLongException(String columnOrType, String value, long valueLength) Gets a SQL exception meaning this value is too long.
| |
| printNextExceptions | back to summary |
|---|---|
| public static void printNextExceptions(SQLException e, PrintWriter s) Prints up to 100 next exceptions for a specified SQL exception.
| |
| printNextExceptions | back to summary |
|---|---|
| public static void printNextExceptions(SQLException e, PrintStream s) Prints up to 100 next exceptions for a specified SQL exception.
| |
| quote | back to summary |
|---|---|
| private static String quote(String s) | |
| setSource | back to summary |
|---|---|
| public void setSource(Object source) | |
| toSQLException | back to summary |
|---|---|
| public static SQLException toSQLException(Throwable e) Convert an exception to a SQL exception using the default mapping.
| |
| traceThrowable | back to summary |
|---|---|
| public static void traceThrowable(Throwable e) Write the exception to the driver manager log writer if configured.
| |
| translate | back to summary |
|---|---|
| private static String translate(String key, String... params) | |