org.hsqldb.error
Class Error
- java.lang.Object
-
- org.hsqldb.error.Error
-
public class Error extends java.lang.ObjectContains static factory methods to produce instances of HsqlException- Since:
- 1.9.0
-
-
Field Summary
Fields Modifier and Type Field and Description static booleanTRACEstatic booleanTRACESYSTEMOUT
-
Constructor Summary
Constructors Constructor and Description Error()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static HsqlExceptionerror(int code)static HsqlExceptionerror(int code, int code2)static HsqlExceptionerror(int code, java.lang.String add)static HsqlExceptionerror(int code, java.lang.Throwable t)static HsqlExceptionerror(Result result)static HsqlExceptionerror(java.lang.String message, java.lang.String sqlState)For SIGNAL and RESIGNALstatic HsqlExceptionerror(java.lang.Throwable t, int code, int subCode, java.lang.Object[] add)Compose error message by inserting the strings in the add parameters in placeholders within the error message.static HsqlExceptionerror(java.lang.Throwable t, int code, java.lang.String add)static intgetCode(java.lang.String sqlState)static java.lang.StringgetMessage(int errorCode)Returns the error message given the error code.
This method is be used when throwing exception other thanHsqlException.static java.lang.StringgetMessage(int code, int subCode, java.lang.Object[] add)Returns the error message given the error code.
This method is used when throwing exception other thanHsqlException.static java.lang.StringgetStateString(int errorCode)Returns the error SQL STATE sting given the error code.
This method is be used when throwing exception based on other exceptions.static HsqlExceptionparseError(int code, int subCode, int lineNumber, java.lang.Object[] add)static HsqlExceptionparseError(int code, java.lang.String add, int lineNumber)static voidprintSystemOut(java.lang.String message)Used to print messages to System.outstatic java.lang.RuntimeExceptionruntimeError(int code, java.lang.String add)
-
-
-
Method Detail
-
runtimeError
public static java.lang.RuntimeException runtimeError(int code, java.lang.String add)
-
error
public static HsqlException error(int code, java.lang.String add)
-
error
public static HsqlException error(java.lang.Throwable t, int code, java.lang.String add)
-
parseError
public static HsqlException parseError(int code, java.lang.String add, int lineNumber)
-
error
public static HsqlException error(int code)
-
error
public static HsqlException error(int code, java.lang.Throwable t)
-
error
public static HsqlException error(java.lang.Throwable t, int code, int subCode, java.lang.Object[] add)
Compose error message by inserting the strings in the add parameters in placeholders within the error message. The message string contains $$ markers for each context variable. Context variables are supplied in the add parameters.- Parameters:
code- main error codesubCode- sub error code (if 0 => no subMessage!)add- optional parameters- Returns:
- an
HsqlException
-
parseError
public static HsqlException parseError(int code, int subCode, int lineNumber, java.lang.Object[] add)
-
error
public static HsqlException error(int code, int code2)
-
error
public static HsqlException error(java.lang.String message, java.lang.String sqlState)
For SIGNAL and RESIGNAL- Returns:
- an
HsqlException - See Also:
HsqlException.HsqlException(Throwable,String, String, int)
-
getMessage
public static java.lang.String getMessage(int errorCode)
Returns the error message given the error code.
This method is be used when throwing exception other thanHsqlException.- Parameters:
errorCode- the error code associated to the error message- Returns:
- the error message associated with the error code
-
getStateString
public static java.lang.String getStateString(int errorCode)
Returns the error SQL STATE sting given the error code.
This method is be used when throwing exception based on other exceptions.- Parameters:
errorCode- the error code associated to the error message- Returns:
- the error message associated with the error code
-
getMessage
public static java.lang.String getMessage(int code, int subCode, java.lang.Object[] add)Returns the error message given the error code.
This method is used when throwing exception other thanHsqlException.- Parameters:
code- the code for the error messagesubCode- the code for the addon messageadd- value(s) to use to replace the placeholer(s)- Returns:
- the error message associated with the error code
-
error
public static HsqlException error(Result result)
-
printSystemOut
public static void printSystemOut(java.lang.String message)
Used to print messages to System.out- Parameters:
message- message to print
-
getCode
public static int getCode(java.lang.String sqlState)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG