Package org.springframework.data.redis
Class FallbackExceptionTranslationStrategy
java.lang.Object
org.springframework.data.redis.PassThroughExceptionTranslationStrategy
org.springframework.data.redis.FallbackExceptionTranslationStrategy
- All Implemented Interfaces:
ExceptionTranslationStrategy
- Since:
- 1.4
- Author:
- Christoph Strobl, Thomas Darimont, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionFallbackExceptionTranslationStrategy(org.springframework.core.convert.converter.Converter<Exception, org.springframework.dao.DataAccessException> converter) -
Method Summary
Modifier and TypeMethodDescriptionprotected RedisSystemExceptionReturns a newRedisSystemExceptionwrapping the givenException.org.springframework.dao.DataAccessExceptionPotentially translate the givenExceptionintoDataAccessException.
-
Constructor Details
-
FallbackExceptionTranslationStrategy
public FallbackExceptionTranslationStrategy(org.springframework.core.convert.converter.Converter<Exception, org.springframework.dao.DataAccessException> converter)
-
-
Method Details
-
translate
Description copied from interface:ExceptionTranslationStrategyPotentially translate the givenExceptionintoDataAccessException.- Specified by:
translatein interfaceExceptionTranslationStrategy- Overrides:
translatein classPassThroughExceptionTranslationStrategy- Parameters:
e- must not be null.- Returns:
- can be null if given
Exceptioncannot be translated.
-
getFallback
Returns a newRedisSystemExceptionwrapping the givenException.- Parameters:
e- causing exception.- Returns:
- the fallback exception.
-