Documentation of 'org.hsqldb.error.Error' Java class
Error
org.hsqldb.error

Class Error



  • public class Error
    extends java.lang.Object
    Contains static factory methods to produce instances of HsqlException
    Since:
    1.9.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static boolean TRACE 
      static boolean TRACESYSTEMOUT 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Error() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static HsqlException error(int code) 
      static HsqlException error(int code, int code2) 
      static HsqlException error(int code, java.lang.String add) 
      static HsqlException error(int code, java.lang.Throwable t) 
      static HsqlException error(Result result) 
      static HsqlException error(java.lang.String message, java.lang.String sqlState)
      For SIGNAL and RESIGNAL
      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.
      static HsqlException error(java.lang.Throwable t, int code, java.lang.String add) 
      static int getCode(java.lang.String sqlState) 
      static java.lang.String getMessage(int errorCode)
      Returns the error message given the error code.
      This method is be used when throwing exception other than HsqlException.
      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 than HsqlException.
      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.
      static HsqlException parseError(int code, int subCode, int lineNumber, java.lang.Object[] add) 
      static HsqlException parseError(int code, java.lang.String add, int lineNumber) 
      static void printSystemOut(java.lang.String message)
      Used to print messages to System.out
      static java.lang.RuntimeException runtimeError(int code, java.lang.String add) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TRACE

        public static boolean TRACE
      • TRACESYSTEMOUT

        public static boolean TRACESYSTEMOUT
    • Constructor Detail

      • Error

        public Error()
    • 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,
                                          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 code
        subCode - 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)
      • 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 than HsqlException.
        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 than HsqlException.
        Parameters:
        code - the code for the error message
        subCode - the code for the addon message
        add - value(s) to use to replace the placeholer(s)
        Returns:
        the error message associated with the error code
      • 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

Ads help maintain this website.