ref_send API 2.17
defensive programming in Java

Class WrongToken

  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.waterken.syntax.WrongToken
All Implemented Interfaces:, Immutable, Powerless

public class WrongToken
extends java.lang.RuntimeException
implements Powerless

Signals parsed data did not contain an expected token at a required position.

See Also:
Serialized Form

Field Summary
 java.lang.String expected
          expected token
Constructor Summary
WrongToken(java.lang.String expected)
          Constructs an instance.
Method Summary
static void require(java.lang.String expected, java.lang.String actual)
          Requires a token to have an expected value.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


public final java.lang.String expected
expected token

Constructor Detail


public WrongToken(java.lang.String expected)
Constructs an instance.

expected - expected
Method Detail


public static void require(java.lang.String expected,
                           java.lang.String actual)
                    throws WrongToken
Requires a token to have an expected value.

expected - expected token
actual - actual token
WrongToken - actual is not expected

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.