ref_send API 2.17
defensive programming in Java

org.waterken.syntax
Class WrongToken

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.waterken.syntax.WrongToken
All Implemented Interfaces:
java.io.Serializable, 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

expected

public final java.lang.String expected
expected token

Constructor Detail

WrongToken

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

Parameters:
expected - expected
Method Detail

require

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

Parameters:
expected - expected token
actual - actual token
Throws:
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.