org.eigenbase.util
Class EigenbaseContextException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eigenbase.util.EigenbaseException
                  extended by org.eigenbase.util.EigenbaseContextException
All Implemented Interfaces:
Serializable

public class EigenbaseContextException
extends EigenbaseException

Exception which contains information about the textual context of the causing exception.

See Also:
Serialized Form

Field Summary
private  int endPosColumn
           
private  int endPosLine
           
private  String originalStatement
           
private  int posColumn
           
private  int posLine
           
private static long serialVersionUID
          SerialVersionUID created with JDK 1.5 serialver tool.
 
Constructor Summary
EigenbaseContextException(String message, Throwable cause)
          Creates a new EigenbaseContextException object.
EigenbaseContextException(String message, Throwable cause, int posLine, int posColumn, int endPosLine, int endPosColumn)
          Creates a new EigenbaseContextException object.
EigenbaseContextException(String message, Throwable cause, String inputText)
          Creates a new EigenbaseContextException object.
 
Method Summary
 int getEndPosColumn()
           
 int getEndPosLine()
           
 String getOriginalStatement()
           
 int getPosColumn()
           
 int getPosLine()
           
 void setOriginalStatement(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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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 String originalStatement
Constructor Detail

EigenbaseContextException

public EigenbaseContextException(String message,
                                 Throwable cause)
Creates a new EigenbaseContextException object. This constructor is for use by the generated factory.

Parameters:
message - error message
cause - underlying cause, must not be null

EigenbaseContextException

public EigenbaseContextException(String message,
                                 Throwable cause,
                                 int posLine,
                                 int posColumn,
                                 int endPosLine,
                                 int endPosColumn)
Creates a new EigenbaseContextException 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

EigenbaseContextException

public EigenbaseContextException(String message,
                                 Throwable cause,
                                 String inputText)
Creates a new EigenbaseContextException 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 String getOriginalStatement()
Returns:
the input string that is associated with the context

setOriginalStatement

public void setOriginalStatement(String originalStatement)
Parameters:
originalStatement - - String to associate with the current context