Package com.igormaznitsa.jbbp.exceptions
Class JBBPTokenizerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.igormaznitsa.jbbp.exceptions.JBBPException
com.igormaznitsa.jbbp.exceptions.JBBPCompilationException
com.igormaznitsa.jbbp.exceptions.JBBPTokenizerException
- All Implemented Interfaces:
Serializable
The Exception can be thrown during parsing sources for tokens and allows to figure
out the position of the problematic token.
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet error part of script where error position marked by !>..<!intget the position in sources of the problematic token.toString()Methods inherited from class com.igormaznitsa.jbbp.exceptions.JBBPCompilationException
getTokenMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
JBBPTokenizerException
Constructor.- Parameters:
message- the exception message.script- the script contains error, can be nullpos- the position of a problematic token inside sources.- Since:
- 2.0.3
-
-
Method Details
-
getErrorPart
Get error part of script where error position marked by !>..<!- Returns:
- error part of the script in position, or empty if it was impossible to extract the part
- Since:
- 2.0.3
-
getPosition
public int getPosition()get the position in sources of the problematic token.- Returns:
- the position or -1 if the position is unknown.
-
toString
-