Package org.apache.calcite.runtime
Class CalciteContextException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.calcite.runtime.CalciteException
-
- org.apache.calcite.runtime.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
-
-
Field Summary
Fields Modifier and Type Field Description private int
endPosColumn
private int
endPosLine
private java.lang.String
originalStatement
private int
posColumn
private int
posLine
private static long
serialVersionUID
SerialVersionUID created with JDK 1.5 serialver tool.
-
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.
-
-
-
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 messagecause
- 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 messagecause
- underlying cause, must not be nullposLine
- 1-based start line numberposColumn
- 1-based start column numberendPosLine
- 1-based end line numberendPosColumn
- 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 messagecause
- underlying cause, must not be nullinputText
- 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 numberposColumn
- 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 numberposColumn
- 1-based start column numberendPosLine
- 1-based end line numberendPosColumn
- 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 classjava.lang.Throwable
-
-