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
ConstructorDescriptionFallbackExceptionTranslationStrategy
(org.springframework.core.convert.converter.Converter<Exception, org.springframework.dao.DataAccessException> converter) -
Method Summary
Modifier and TypeMethodDescriptionprotected RedisSystemException
Returns a newRedisSystemException
wrapping the givenException
.org.springframework.dao.DataAccessException
Potentially translate the givenException
intoDataAccessException
.
-
Constructor Details
-
FallbackExceptionTranslationStrategy
public FallbackExceptionTranslationStrategy(org.springframework.core.convert.converter.Converter<Exception, org.springframework.dao.DataAccessException> converter)
-
-
Method Details
-
translate
Description copied from interface:ExceptionTranslationStrategy
Potentially translate the givenException
intoDataAccessException
.- Specified by:
translate
in interfaceExceptionTranslationStrategy
- Overrides:
translate
in classPassThroughExceptionTranslationStrategy
- Parameters:
e
- must not be null.- Returns:
- can be null if given
Exception
cannot be translated.
-
getFallback
Returns a newRedisSystemException
wrapping the givenException
.- Parameters:
e
- causing exception.- Returns:
- the fallback exception.
-