Class CalciteContextException

  • All Implemented Interfaces:
    java.io.Serializable

    public class CalciteContextException
    extends CalciteException
    Exception which contains information about the textual context of the causing exception.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CalciteContextException​(java.lang.String message, java.lang.Throwable cause)
      Creates a new CalciteContextException object.
      CalciteContextException​(java.lang.String message, java.lang.Throwable cause, int posLine, int posColumn, int endPosLine, int endPosColumn)
      Creates a new CalciteContextException object.
      CalciteContextException​(java.lang.String message, java.lang.Throwable cause, java.lang.String inputText)
      Creates a new CalciteContextException object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getEndPosColumn()  
      int getEndPosLine()  
      java.lang.String getMessage()  
      java.lang.String getOriginalStatement()  
      int getPosColumn()  
      int getPosLine()  
      void setOriginalStatement​(java.lang.String originalStatement)  
      void setPosition​(int posLine, int posColumn)
      Sets a textual position at which this exception was detected.
      void setPosition​(int posLine, int posColumn, int endPosLine, int endPosColumn)
      Sets a textual range at which this exception was detected.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        SerialVersionUID created with JDK 1.5 serialver tool. Prevents incompatible class conflict when serialized from JDK 1.5-built server to JDK 1.4-built client.
        See Also:
        Constant Field Values
      • posLine

        private int posLine
      • posColumn

        private int posColumn
      • endPosLine

        private int endPosLine
      • endPosColumn

        private int endPosColumn
      • originalStatement

        private java.lang.String originalStatement
    • Constructor Detail

      • CalciteContextException

        public CalciteContextException​(java.lang.String message,
                                       java.lang.Throwable cause)
        Creates a new CalciteContextException object. This constructor is for use by the generated factory.
        Parameters:
        message - error message
        cause - underlying cause, must not be null
      • CalciteContextException

        public CalciteContextException​(java.lang.String message,
                                       java.lang.Throwable cause,
                                       int posLine,
                                       int posColumn,
                                       int endPosLine,
                                       int endPosColumn)
        Creates a new CalciteContextException object.
        Parameters:
        message - error message
        cause - underlying cause, must not be null
        posLine - 1-based start line number
        posColumn - 1-based start column number
        endPosLine - 1-based end line number
        endPosColumn - 1-based end column number
      • CalciteContextException

        public CalciteContextException​(java.lang.String message,
                                       java.lang.Throwable cause,
                                       java.lang.String inputText)
        Creates a new CalciteContextException object. This constructor is for use by the generated factory.
        Parameters:
        message - error message
        cause - underlying cause, must not be null
        inputText - is the orginal SQL statement, may be null
    • Method Detail

      • setPosition

        public void setPosition​(int posLine,
                                int posColumn)
        Sets a textual position at which this exception was detected.
        Parameters:
        posLine - 1-based line number
        posColumn - 1-based column number
      • setPosition

        public void setPosition​(int posLine,
                                int posColumn,
                                int endPosLine,
                                int endPosColumn)
        Sets a textual range at which this exception was detected.
        Parameters:
        posLine - 1-based start line number
        posColumn - 1-based start column number
        endPosLine - 1-based end line number
        endPosColumn - 1-based end column number
      • getPosLine

        public int getPosLine()
        Returns:
        1-based line number, or 0 for missing position information
      • getPosColumn

        public int getPosColumn()
        Returns:
        1-based column number, or 0 for missing position information
      • getEndPosLine

        public int getEndPosLine()
        Returns:
        1-based ending line number, or 0 for missing position information
      • getEndPosColumn

        public int getEndPosColumn()
        Returns:
        1-based ending column number, or 0 for missing position information
      • getOriginalStatement

        public java.lang.String getOriginalStatement()
        Returns:
        the input string that is associated with the context
      • setOriginalStatement

        public void setOriginalStatement​(java.lang.String originalStatement)
        Parameters:
        originalStatement - - String to associate with the current context
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable