public class ParserException extends Exception
Signals that a parse failure has occurred.
Producer : com.parse2.aparse.Parser 2.5
Produced : Mon Jul 15 14:23:14 IST 2019
| Constructor and Description |
|---|
ParserException(String reason,
String text,
int index,
Stack<String> ruleStack)
Creates a parser exception from the specified parse failure information.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage()
Returns a message detailing the parse failure.
|
String |
getReason()
Returns the description of the parse failure.
|
Stack<String> |
getRuleStack()
Returns the ABNF rule stack at the point the parse failure occurred.
|
String |
getSubstring()
Returns a substring of the parsed string that encompasses the point
at which the parse failure occurred.
|
int |
getSubstringIndex()
Returns an index to the character within the substring returned by
getSubstring() at which the parse failure occurred. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic ParserException(String reason, String text, int index, Stack<String> ruleStack)
reason - A description of the parse failure.text - The string of characters being parsed.index - The index to the character at which the parse failure occurred.ruleStack - The ABNF rule stack at the point the parse failure occurred.public String getReason()
public String getSubstring()
getSubstringIndex() returns an index to the character within
this substring at which the parse failure occurred. This substring
may contain non-printable characters.public int getSubstringIndex()
getSubstring() at which the parse failure occurred.getSubstring() at which the parse failure occurred.public Stack<String> getRuleStack()
public String getMessage()
rule "Minutes" failed
15:75:47
^
rule stack:
Clock
MinutesgetMessage in class ThrowableCopyright © 2021 WSO2. All rights reserved.