lime
Class LimeRuntimeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bylime.LimeRuntimeException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
IllegalReactionOperationException, IllegalSharingException, IllegalTupleSpaceAccessException, IllegalTupleSpaceModificationException, IllegalTupleSpaceNameException, IncompatibleLocationsException

public class LimeRuntimeException
extends java.lang.RuntimeException

The superclass of all runtime exceptions generated by this package. Instances of this class are also used to wrap lower-level exceptions (called internal exceptions) generated by the implementation, e.g., IOExceptionException or ClassNotFoundException.

Version:
1.0 alpha
Author:
Amy L. Murphy, Gian Pietro Picco
See Also:
Serialized Form

Field Summary
private  java.lang.Exception internal
           
private  boolean internalFlag
           
 
Fields inherited from class java.lang.RuntimeException
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
LimeRuntimeException()
          Creates a new exception with no internal, lower-level exception.
LimeRuntimeException(java.lang.Exception internal)
          Creates an exception that wraps an internal exception.
LimeRuntimeException(java.lang.Exception internal, java.lang.String s)
          Creates an exception that wraps an internal exception.
LimeRuntimeException(java.lang.String s)
          Creates a new exception with no internal, lower-level exception.
 
Method Summary
 java.lang.Exception getInternal()
          Returns the internal exception associated with this object.
 boolean hasInternal()
          Tests whether this exception contains an internal exception.
 void printStackTrace()
          Prints this exception and its backtrace to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints this exception and its backtrace to the specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints this exception and its backtrace to the specified print writer.
private  void setInternal(java.lang.Exception internal)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

internal

private java.lang.Exception internal

internalFlag

private boolean internalFlag
Constructor Detail

LimeRuntimeException

public LimeRuntimeException(java.lang.Exception internal)
Creates an exception that wraps an internal exception.

Parameters:
internal - the internal exception.

LimeRuntimeException

public LimeRuntimeException()
Creates a new exception with no internal, lower-level exception.


LimeRuntimeException

public LimeRuntimeException(java.lang.String s)
Creates a new exception with no internal, lower-level exception.

Parameters:
s - an explanatory message for the exception.

LimeRuntimeException

public LimeRuntimeException(java.lang.Exception internal,
                            java.lang.String s)
Creates an exception that wraps an internal exception.

Parameters:
internal - the internal exception.
s - an explanatory message for the exception.
Method Detail

hasInternal

public boolean hasInternal()
Tests whether this exception contains an internal exception.

Returns:
true if this exception contains an internal one, false otherwise.

getInternal

public java.lang.Exception getInternal()
Returns the internal exception associated with this object.

Returns:
the internal exception, null if there is none.

toString

public java.lang.String toString()

printStackTrace

public void printStackTrace()
Prints this exception and its backtrace to the standard error stream.


printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints this exception and its backtrace to the specified print stream.


printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints this exception and its backtrace to the specified print writer.


setInternal

private void setInternal(java.lang.Exception internal)