|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception org.eigenbase.sql.parser.SqlParseException
public class SqlParseException
SqlParseException defines a checked exception corresponding to SqlParser
.
Field Summary | |
---|---|
private int[][] |
expectedTokenSequences
|
private Throwable |
parserException
The original exception thrown by the generated parser. |
private SqlParserPos |
pos
|
private String[] |
tokenImages
|
Constructor Summary | |
---|---|
SqlParseException(String message,
SqlParserPos pos,
int[][] expectedTokenSequences,
String[] tokenImages,
Throwable parserException)
Creates a SqlParseException. |
Method Summary | |
---|---|
Throwable |
getCause()
|
Collection<String> |
getExpectedTokenNames()
Returns a list of the token names which could have legally occurred at this point. |
int[][] |
getExpectedTokenSequences()
Returns the expected token sequences. |
SqlParserPos |
getPos()
Returns the position where this error occurred. |
String[] |
getTokenImages()
Returns the token images. |
private Object |
writeReplace()
Per Serializable API, provides a replacement object to be
written during serialization. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, 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 |
---|
private final SqlParserPos pos
private final int[][] expectedTokenSequences
private final String[] tokenImages
private final transient Throwable parserException
Also, make it transient, because it is a ParseException generated by JavaCC and contains a non-serializable Token.
Constructor Detail |
---|
public SqlParseException(String message, SqlParserPos pos, int[][] expectedTokenSequences, String[] tokenImages, Throwable parserException)
message
- Messagepos
- PositionexpectedTokenSequences
- Token sequencestokenImages
- Token imagesparserException
- Parser exceptionMethod Detail |
---|
public SqlParserPos getPos()
public Collection<String> getExpectedTokenNames()
If some of the alternatives contain multiple tokens, returns the last token of only these longest sequences. (This occurs when the parser is maintaining more than the usual lookup.) For instance, if the possible tokens are
returns{"IN"} {"BETWEEN"} {"LIKE"} {"=", "<IDENTIFIER>"} {"=", "USER"}
"<IDENTIFIER>" "USER"
public String[] getTokenImages()
public int[][] getExpectedTokenSequences()
public Throwable getCause()
getCause
in class Throwable
private Object writeReplace()
Serializable
API, provides a replacement object to be
written during serialization.
SqlParseException is serializable but is not available on the client.
This implementation converts this SqlParseException into a vanilla RuntimeException
with the same message.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |