org.garret.perst
Class StorageError

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

public class StorageError
extends java.lang.RuntimeException

Exception throw by storage implementation

See Also:
Serialized Form

Field Summary
static int ACCESS_TO_STUB
           
static int ACCESS_VIOLATION
           
static int BAD_PROPERTY_VALUE
           
static int CLASS_NOT_FOUND
           
static int CONSTRUCTOR_FAILURE
           
static int DATABASE_CORRUPTED
           
static int DELETED_OBJECT
           
static int DESCRIPTOR_FAILURE
           
static int EMPTY_VALUE
           
static int FILE_ACCESS_ERROR
           
static int INCOMPATIBLE_KEY_TYPE
           
static int INDEXED_FIELD_NOT_FOUND
           
static int INVALID_OID
           
static int KEY_NOT_FOUND
           
static int KEY_NOT_UNIQUE
           
static int LOCK_FAILED
           
static int NO_SUCH_PROPERTY
           
static int NOT_ENOUGH_SPACE
           
static int NULL_VALUE
           
static int SCHEMA_CHANGED
           
static int SERIALIZE_PERSISTENT
           
static int STORAGE_ALREADY_OPENED
           
static int STORAGE_IS_USED
           
static int STORAGE_NOT_OPENED
           
static int UNSUPPORTED_ENCODING
           
static int UNSUPPORTED_INDEX_TYPE
           
static int UNSUPPORTED_TYPE
           
 
Constructor Summary
StorageError(int errorCode)
           
StorageError(int errorCode, java.lang.Exception x)
           
StorageError(int errorCode, java.lang.Object param)
           
StorageError(int errorCode, java.lang.Object param, java.lang.Exception x)
           
 
Method Summary
 int getErrorCode()
          Get exception error code (see definitions above)
 java.lang.Exception getOriginalException()
          Get original exception if StorageError excepotion was thrown as the result of catching some other exception within Storage implementation.
 
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
 

Field Detail

ACCESS_TO_STUB

public static final int ACCESS_TO_STUB
See Also:
Constant Field Values

ACCESS_VIOLATION

public static final int ACCESS_VIOLATION
See Also:
Constant Field Values

BAD_PROPERTY_VALUE

public static final int BAD_PROPERTY_VALUE
See Also:
Constant Field Values

CLASS_NOT_FOUND

public static final int CLASS_NOT_FOUND
See Also:
Constant Field Values

CONSTRUCTOR_FAILURE

public static final int CONSTRUCTOR_FAILURE
See Also:
Constant Field Values

DATABASE_CORRUPTED

public static final int DATABASE_CORRUPTED
See Also:
Constant Field Values

DELETED_OBJECT

public static final int DELETED_OBJECT
See Also:
Constant Field Values

DESCRIPTOR_FAILURE

public static final int DESCRIPTOR_FAILURE
See Also:
Constant Field Values

EMPTY_VALUE

public static final int EMPTY_VALUE
See Also:
Constant Field Values

FILE_ACCESS_ERROR

public static final int FILE_ACCESS_ERROR
See Also:
Constant Field Values

INCOMPATIBLE_KEY_TYPE

public static final int INCOMPATIBLE_KEY_TYPE
See Also:
Constant Field Values

INDEXED_FIELD_NOT_FOUND

public static final int INDEXED_FIELD_NOT_FOUND
See Also:
Constant Field Values

INVALID_OID

public static final int INVALID_OID
See Also:
Constant Field Values

KEY_NOT_FOUND

public static final int KEY_NOT_FOUND
See Also:
Constant Field Values

KEY_NOT_UNIQUE

public static final int KEY_NOT_UNIQUE
See Also:
Constant Field Values

LOCK_FAILED

public static final int LOCK_FAILED
See Also:
Constant Field Values

NO_SUCH_PROPERTY

public static final int NO_SUCH_PROPERTY
See Also:
Constant Field Values

NOT_ENOUGH_SPACE

public static final int NOT_ENOUGH_SPACE
See Also:
Constant Field Values

NULL_VALUE

public static final int NULL_VALUE
See Also:
Constant Field Values

SCHEMA_CHANGED

public static final int SCHEMA_CHANGED
See Also:
Constant Field Values

SERIALIZE_PERSISTENT

public static final int SERIALIZE_PERSISTENT
See Also:
Constant Field Values

STORAGE_ALREADY_OPENED

public static final int STORAGE_ALREADY_OPENED
See Also:
Constant Field Values

STORAGE_IS_USED

public static final int STORAGE_IS_USED
See Also:
Constant Field Values

STORAGE_NOT_OPENED

public static final int STORAGE_NOT_OPENED
See Also:
Constant Field Values

UNSUPPORTED_ENCODING

public static final int UNSUPPORTED_ENCODING
See Also:
Constant Field Values

UNSUPPORTED_INDEX_TYPE

public static final int UNSUPPORTED_INDEX_TYPE
See Also:
Constant Field Values

UNSUPPORTED_TYPE

public static final int UNSUPPORTED_TYPE
See Also:
Constant Field Values
Constructor Detail

StorageError

public StorageError(int errorCode)

StorageError

public StorageError(int errorCode,
                    java.lang.Exception x)

StorageError

public StorageError(int errorCode,
                    java.lang.Object param)

StorageError

public StorageError(int errorCode,
                    java.lang.Object param,
                    java.lang.Exception x)
Method Detail

getErrorCode

public int getErrorCode()
Get exception error code (see definitions above)


getOriginalException

public java.lang.Exception getOriginalException()
Get original exception if StorageError excepotion was thrown as the result of catching some other exception within Storage implementation. StorageError is used as wrapper of other exceptions to avoid cascade propagation of throws and try/catch constructions.

Returns:
original exception or null if there is no such exception