Class InvalidKeywordException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
technology.sola.json.tokenizer.exception.InvalidKeywordException
All Implemented Interfaces:
Serializable, SolaJsonParsingError

public class InvalidKeywordException extends RuntimeException implements SolaJsonParsingError
Exception for when an invalid keyword is found during tokenization.
See Also:
  • Constructor Details

    • InvalidKeywordException

      public InvalidKeywordException(String keyword, String current, char invalidChar, int line, int column)
      Creates a new instance of this exception.
      Parameters:
      keyword - the expected keyword
      current - the keyword currently read
      invalidChar - the invalid character for the expected keyword
      line - line where the invalid character was found
      column - column where the invalid character was found
  • Method Details

    • getLine

      public int getLine()
      Specified by:
      getLine in interface SolaJsonParsingError
      Returns:
      the line where the syntax error began
    • getColumn

      public int getColumn()
      Specified by:
      getColumn in interface SolaJsonParsingError
      Returns:
      the column where the syntax error began
    • getExpected

      public String getExpected()
      Returns:
      the expected keyword
    • getActual

      public String getActual()
      Returns:
      the received keyword