Class JBBPTokenizerException

All Implemented Interfaces:
Serializable

public class JBBPTokenizerException extends JBBPCompilationException
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 Details

    • JBBPTokenizerException

      public JBBPTokenizerException(String message, String script, int pos)
      Constructor.
      Parameters:
      message - the exception message.
      script - the script contains error, can be null
      pos - the position of a problematic token inside sources.
      Since:
      2.0.3
  • Method Details

    • getErrorPart

      public String 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

      public String toString()
      Overrides:
      toString in class Throwable