|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.message.Message
public class Message
Messages used in the database engine. Use the PropertiesToUTF8 tool to translate properties files to UTF-8 and back. If the word 'SQL' appears then the whole SQL statement must be a parameter, otherwise this may be added: '; SQL statement: ' + sql
| Method Summary | |
|---|---|
static java.sql.SQLException |
addSQL(java.sql.SQLException e,
java.lang.String sql)
Attach a SQL statement to the exception if this is not already done. |
static java.sql.SQLException |
convert(java.lang.Exception e)
Convert an exception to a SQL exception using the default mapping. |
static java.sql.SQLException |
convert(java.lang.Exception e,
java.lang.String sql)
Convert an exception to a SQL exception using the default mapping. |
static java.sql.SQLException |
convert(java.lang.StackOverflowError e)
Convert a stack overflow error. |
static java.sql.SQLException |
convertIOException(java.io.IOException e,
java.lang.String message)
Convert an IO exception to a SQL exception. |
static java.sql.SQLException |
convertThrowable(java.lang.Throwable e)
Convert a throwable to an SQL exception using the default mapping. |
static InternalException |
convertToInternal(java.lang.Exception e)
Convert an exception to an internal runtime exception. |
static java.io.IOException |
convertToIOException(java.lang.Throwable e)
Convert an exception to an IO exception. |
static java.lang.Error |
getInternalError(java.lang.String s,
java.lang.Exception e)
Gets an internal error. |
static JdbcSQLException |
getInvalidValueException(java.lang.String value,
java.lang.String param)
Gets a SQL exception meaning this value is invalid. |
static JdbcSQLException |
getSQLException(int errorCode)
Gets the SQL exception object for a specific error code. |
static JdbcSQLException |
getSQLException(int errorCode,
java.lang.String... params)
Gets the SQL exception object for a specific error code. |
static JdbcSQLException |
getSQLException(int errorCode,
java.lang.String p1)
Gets the SQL exception object for a specific error code. |
static JdbcSQLException |
getSQLException(int errorCode,
java.lang.Throwable cause,
java.lang.String... params)
Gets the SQL exception object for a specific error code. |
static java.sql.SQLException |
getSyntaxError(java.lang.String sql,
int index)
Constructs a syntax error SQL exception. |
static java.sql.SQLException |
getSyntaxError(java.lang.String sql,
int index,
java.lang.String expected)
Constructs a syntax error SQL exception. |
static JdbcSQLException |
getUnsupportedException(java.lang.String message)
Gets a SQL exception meaning this feature is not supported. |
static java.lang.RuntimeException |
throwInternalError()
Throw an internal error. |
static java.lang.RuntimeException |
throwInternalError(java.lang.String s)
Throw an internal error. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JdbcSQLException getSQLException(int errorCode,
java.lang.String p1)
errorCode - the error codep1 - the first parameter of the message
public static JdbcSQLException getSQLException(int errorCode,
java.lang.Throwable cause,
java.lang.String... params)
errorCode - the error codecause - the cause of the exceptionparams - the list of parameters of the message
public static JdbcSQLException getSQLException(int errorCode,
java.lang.String... params)
errorCode - the error codeparams - the list of parameters of the message
public static java.sql.SQLException getSyntaxError(java.lang.String sql,
int index)
sql - the SQL statementindex - the position of the error in the SQL statement
public static java.sql.SQLException getSyntaxError(java.lang.String sql,
int index,
java.lang.String expected)
sql - the SQL statementindex - the position of the error in the SQL statementexpected - the expected keyword at the given position
public static JdbcSQLException getSQLException(int errorCode)
errorCode - the error code
public static JdbcSQLException getUnsupportedException(java.lang.String message)
message - what exactly is not supported
public static JdbcSQLException getInvalidValueException(java.lang.String value,
java.lang.String param)
value - the value passedparam - the name of the parameter
public static java.lang.RuntimeException throwInternalError(java.lang.String s)
s - the message
java.lang.RuntimeException - the exceptionpublic static java.lang.RuntimeException throwInternalError()
public static java.lang.Error getInternalError(java.lang.String s,
java.lang.Exception e)
s - the messagee - the root cause
public static java.sql.SQLException addSQL(java.sql.SQLException e,
java.lang.String sql)
e - the original SQL exceptionsql - the SQL statement
public static java.sql.SQLException convert(java.lang.Exception e,
java.lang.String sql)
e - the root causesql - the SQL statement or null if it is not known
public static java.sql.SQLException convert(java.lang.StackOverflowError e)
e - the root cause
public static java.sql.SQLException convert(java.lang.Exception e)
e - the root cause
public static java.sql.SQLException convertThrowable(java.lang.Throwable e)
e - the root cause
public static java.sql.SQLException convertIOException(java.io.IOException e,
java.lang.String message)
e - the root causemessage - the message
public static InternalException convertToInternal(java.lang.Exception e)
e - the root cause
public static java.io.IOException convertToIOException(java.lang.Throwable e)
e - the root cause
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||