org.ehcache.core.exceptions
Class CachePassThroughException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.ehcache.core.exceptions.CachePassThroughException
All Implemented Interfaces:
java.io.Serializable

public class CachePassThroughException
extends java.lang.RuntimeException

A generic wrapper runtime exception that will not be caught and handled at the store level.

This wrapper can be used to enable any runtime exceptions that you don't want to be caught at the store level to be propagated.

See Also:
Serialized Form

Constructor Summary
CachePassThroughException(java.lang.String message, java.lang.Throwable cause)
          Creates an exception with the provided message and cause.
CachePassThroughException(java.lang.Throwable cause)
          Creates an exception with the provided cause.
 
Method Summary
static void handleRuntimeException(java.lang.RuntimeException re)
          Helper method for handling runtime exceptions.
 
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

CachePassThroughException

public CachePassThroughException(java.lang.String message,
                                 java.lang.Throwable cause)
Creates an exception with the provided message and cause.

Parameters:
message - information about the exception
cause - the cause of this exception

CachePassThroughException

public CachePassThroughException(java.lang.Throwable cause)
Creates an exception with the provided cause.

Parameters:
cause - the cause of this exception
Method Detail

handleRuntimeException

public static void handleRuntimeException(java.lang.RuntimeException re)
                                   throws CacheAccessException
Helper method for handling runtime exceptions.

Throwing most as CacheAccessException except for CachePassThroughException. In which case if its cause is a RuntimeException it is thrown back and if not it is wrapped in a CacheAccessException.

Parameters:
re - the exception to handler
Throws:
CacheAccessException - except for CachePassThroughException containing a RuntimeException