Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Server Java Object Cache API Reference 10g Release 3 (10.1.3) B25712-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ias.cache
Class CacheException

`java.lang.Object
java.lang.Throwable
java.lang.Exception
oracle.ias.cache.CacheException`

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  CacheConfigParsingException, CacheFullException, CacheNotAvailableException, CachePermissionsException, CallbackException, CantSynchronizeGroupException, DiskCacheException, GroupNameException, GroupUseException, InvalidArgumentException, InvalidGroupException, InvalidHandleException, InvalidObjectException, InvalidOperationException, LoadConflictException, NetworkException, NoObjectAvailableException, NotAPoolException, NotARetrievableObjectException, NotImplementedException, NotOwnerException, NullObjectException, NullObjectNameException, ObjectExistsException, ObjectNotFoundException, ObjectNotSynchronizedException, ResponseFailedException, SyncObjectDestroyedException, TimeoutException

public class CacheException
extends java.lang.Exception

CacheException is a generic exception, which indicates a cache error has occurred. All the other cache exceptions are the subclass of this class. All the methods in the cache package only throw CacheException or the sub class of it. CacheException may have a base exception, which is the exception that originally occurred. User can catch a CacheException, and then further examine the base exception to find the reason exception happens.

For example, this can be a sample usage model:

          try
          {
            Object obj = cacheAccess.get("foo");
            // ... lots of lines here ...
          }
          catch (CacheException ex)
          {
            ex.printStackTrace();
            Exception base = ex.getBaseException();
            if (base != null)
              base.printStackTrace();
          }
          catch (Exception ex)
          {
             // handle other exceptions
          }

See Also:
  Serialized Form

Field Summary
`protected java.lang.Exception` | `base`

Constructor Summary
`CacheException()` Constructs a new CacheException.
`CacheException(java.lang.String s)` Constructs a new CacheException with a message string.
`CacheException(java.lang.String s, java.lang.Exception ex)` Constructs a CacheException with a message string, and a base exception

Method Summary
`java.lang.Exception` | `getBaseException()` getBaseException returns the original exception if the CacheException is translated from this original exception
`java.lang.String` | `getMessage()`
`void` | `printStackTrace()` If a base exception exists, printStackTrace will print the stack for the the base exception rather than the current one.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### base

    protected java.lang.Exception base

Constructor Detail

### CacheException

    public CacheException()

  Constructs a new CacheException.
Since:
  2.0.0

### CacheException

    public CacheException(java.lang.String s)

  Constructs a new CacheException with a message string.
Since:
  2.0.0

### CacheException

    public CacheException(java.lang.String s,
                          java.lang.Exception ex)

  Constructs a CacheException with a message string, and a base exception
Since:
  2.0.0

Method Detail

### getBaseException

    public java.lang.Exception getBaseException()

  getBaseException returns the original exception if the CacheException is translated from this original exception
  Returns:
    the original exception
  Since:
    2.0.0

### printStackTrace

    public void printStackTrace()

  If a base exception exists, printStackTrace will print the stack for the the base exception rather than the current one. If base is null the stack of the current exception is printed
  Since:
    2.0.0

### getMessage

    public java.lang.String getMessage()

Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Server Java Object Cache API Reference 10g Release 3 (10.1.3) B25712-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004, 2005, Oracle. All rights reserved.