org.garret.consus
Class POSError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.garret.consus.POSError
All Implemented Interfaces:
java.io.Serializable

public class POSError
extends java.lang.RuntimeException

Persistent Object Storage error. All exceptions thrown by Consus during operations with persistent objects are caught and the POSError exception is rethrown. The POSError exception is derived from the RuntimeException class, so that it does not need to be caught or declared by methods working with persistent objects.

See Also:
Serialized Form

Constructor Summary
POSError(java.lang.Exception x)
          Constructs the exception.
 
Method Summary
 boolean isUniqueConstraintViolated()
          Checks whether unique contraint violations were the reason for the persistent object storage error.
 java.lang.Exception reason()
          Get the original exception.
 
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
 

Constructor Detail

POSError

public POSError(java.lang.Exception x)
Constructs the exception.

Parameters:
x - original exception
Method Detail

isUniqueConstraintViolated

public boolean isUniqueConstraintViolated()
Checks whether unique contraint violations were the reason for the persistent object storage error.

Returns:
true if ConsusConstraintViolation exception was thrown

reason

public java.lang.Exception reason()
Get the original exception.

Returns:
SQLException for persistent storage error