laser.util
Class InconsistentObjectError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by laser.util.InconsistentObjectError
All Implemented Interfaces:
java.io.Serializable

public class InconsistentObjectError
extends java.lang.Error

The InconsistentObjectError class signals that an Object or its constituent parts has been manipulated by the programmer in a well-defined way and has encountered unexcepted behavior that should "never" occur. The Object is no longer consistent (i.e. well-formed).

NOTE: This allows applications to "clean up" before they terminate. But allows the Object to signal that something is seriously wrong.

Author:
Heather M. Conboy (laser-software@cs.umass.edu)
See Also:
Serialized Form

Constructor Summary
InconsistentObjectError(java.lang.Object obj, java.lang.Throwable cause)
          Creates a new InconsistentObjectError for the given Object that was caused by the given Throwable.
InconsistentObjectError(java.lang.String msg, java.lang.Object obj)
          Creates a new InconsistentObjectError for the given Object with the specified message to report to the user.
InconsistentObjectError(java.lang.String msg, java.lang.Object obj, java.lang.Throwable cause)
          Creates a new InconsistentObjectError for the given Object with the specified message to report to the user that was caused by the given Throwable.
 
Method Summary
 java.lang.Object getObject()
          Gets the Object that is no longer consistent (ie well-formed).
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InconsistentObjectError

public InconsistentObjectError(java.lang.Object obj,
                               java.lang.Throwable cause)
Creates a new InconsistentObjectError for the given Object that was caused by the given Throwable.

Parameters:
obj - The Object that is no longer consistent (ie well-formed)
cause - The Throwable that caused the problem

InconsistentObjectError

public InconsistentObjectError(java.lang.String msg,
                               java.lang.Object obj)
Creates a new InconsistentObjectError for the given Object with the specified message to report to the user.

Parameters:
msg - The message to report to the user
obj - The Object that is no longer consistent (ie well-formed)

InconsistentObjectError

public InconsistentObjectError(java.lang.String msg,
                               java.lang.Object obj,
                               java.lang.Throwable cause)
Creates a new InconsistentObjectError for the given Object with the specified message to report to the user that was caused by the given Throwable.

Parameters:
msg - The message to report to the user
obj - The Object that is no longer consistent (ie well-formed)
cause - The Throwable that caused the problem
Method Detail

getObject

public java.lang.Object getObject()
Gets the Object that is no longer consistent (ie well-formed).

Returns:
The inconsistent Object