uk.ac.ic.doc.automed
Class InconsistentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by uk.ac.ic.doc.automed.InconsistentException
All Implemented Interfaces:
java.io.Serializable

public class InconsistentException
extends java.lang.RuntimeException

A manipulation of the repository that should always succeed has failed. This will be caused when two users (or two Java applications) are operating on the same repository, since the AutoMed system at present implements no concurrency control. If the message persists, then recreate the repository. If the above is not the case, then there must be a bug in the AutoMed system, which should be reported.

Author:
Michael Boyd (mboyd@doc.ic.ac.uk), Peter McBrien (pjm@doc.ic.ac.uk), Nerissa Tong (nnyt98@doc.ic.ac.uk)
See Also:
Serialized Form

Constructor Summary
InconsistentException(java.lang.String msg)
           
InconsistentException(java.lang.String msg, java.lang.Exception e)
          Creates an InconsistentException when it is acting as a wrapper for other Exceptions.
 
Method Summary
static InconsistentException newInconsistentException(java.lang.String msg, java.lang.Exception e)
          Create a new InconsistentException only if necessary.
 void printStackTrace()
          Overrides {#link Exception.printStackTrace()} method to also print source exception details
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InconsistentException

public InconsistentException(java.lang.String msg)

InconsistentException

public InconsistentException(java.lang.String msg,
                             java.lang.Exception e)
Creates an InconsistentException when it is acting as a wrapper for other Exceptions.

Parameters:
msg - message for the exception.
Method Detail

newInconsistentException

public static InconsistentException newInconsistentException(java.lang.String msg,
                                                             java.lang.Exception e)
Create a new InconsistentException only if necessary.

Parameters:
msg - message of new exception if generated.
e - exception that caused this exception to be generated
Returns:
e if it is an InconsistentException, otherwise a new InconsistentException containing msg and e.

printStackTrace

public void printStackTrace()
Overrides {#link Exception.printStackTrace()} method to also print source exception details

Overrides:
printStackTrace in class java.lang.Throwable