UnexpectedTokenFoundException
Home ] Up ] ParserException ] DivisionByZeroException ] ParserIOException ] ParserNumberFormatException ] UnbalancedParenthesesException ] UnexpectedExtraTokenException ] [ UnexpectedTokenFoundException ] UnsupportedFeatureException ]

 

 

package parser;

/**
 * Exception thrown when no expression was found by the parser.
 *
 * @author Bryan J. Higgs
 */
public class UnexpectedTokenFoundException extends ParserException
{
  /**
   * Constructor
   */
  public UnexpectedTokenFoundException(Token token, String line)
  {
    super(line, token.getOffset());
    m_token = token;
  }

  /**
   * Gets the message for the exception
   * (implementation of abstract method)
   */
  public String getMessage()
  {
    return "Unexpected token encountered " + m_token;
  }

  //// Private data ////
  private Token m_token;
}
The page was last updated February 19, 2008