orc.error.runtime
Class TokenException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by orc.error.OrcException
              extended by orc.error.runtime.ExecutionException
                  extended by orc.error.runtime.TokenException
All Implemented Interfaces:
java.io.Serializable, Locatable, Located
Direct Known Subclasses:
CapabilityException, MessageNotUnderstoodException, RuntimeTypeException, SiteException, StackLimitReachedError, TokenError, UncaughtException

public abstract class TokenException
extends ExecutionException
implements Locatable

A localized failure at runtime. Errors of this type cause the executing token to remain silent and leave the execution, but they do not otherwise disrupt the execution. Since tokens are located at specific nodes and can thus be assigned a source location, a TokenException implements Locatable and will typically have its source location set before the exception is passed back to the engine.

Author:
dkitchin
See Also:
Serialized Form

Constructor Summary
TokenException(java.lang.String message)
           
TokenException(java.lang.String message, java.lang.Throwable cause)
           
 
Method Summary
 SourceLocation[] getBacktrace()
           
 SourceLocation getSourceLocation()
           
 void setBacktrace(SourceLocation[] backtrace)
           
 void setSourceLocation(SourceLocation location)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TokenException

public TokenException(java.lang.String message)

TokenException

public TokenException(java.lang.String message,
                      java.lang.Throwable cause)
Method Detail

setBacktrace

public void setBacktrace(SourceLocation[] backtrace)

getBacktrace

public SourceLocation[] getBacktrace()

getSourceLocation

public SourceLocation getSourceLocation()
Specified by:
getSourceLocation in interface Located

setSourceLocation

public void setSourceLocation(SourceLocation location)
Specified by:
setSourceLocation in interface Locatable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable