Class CalciteContextException

All Implemented Interfaces:
Serializable

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

    • CalciteContextException

      public CalciteContextException(String message, 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(String message, 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(String message, Throwable cause, 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 Details

    • 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(@UnknownInitialization CalciteContextException this, 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 the 1-based line number, or 0 for missing position information.
    • getPosColumn

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

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

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

      public @Nullable String getOriginalStatement()
      Returns the input string that is associated with the context.
    • setOriginalStatement

      public void setOriginalStatement(@Nullable String originalStatement)
      Sets the input string to associate with the current context.
    • getMessage

      public @Nullable String getMessage()
      Overrides:
      getMessage in class Throwable