java.lang.Object
io.lettuce.core.internal.ExceptionFactory
public abstract class ExceptionFactory extends Object
Factory for Redis exceptions.
- Since:
- 4.5
- Author:
- Mark Paluch
-
Method Summary
Modifier and Type Method Description static RedisCommandExecutionExceptioncreateExecutionException(String message)Create aRedisCommandExecutionExceptionwith a detail message.static RedisCommandExecutionExceptioncreateExecutionException(String message, Throwable cause)Create aRedisCommandExecutionExceptionwith a detail message and optionally acause.static RedisCommandTimeoutExceptioncreateTimeoutException(String message, Duration timeout)Create aRedisCommandTimeoutExceptionwith a detail message given the message and timeout.static RedisCommandTimeoutExceptioncreateTimeoutException(Duration timeout)Create aRedisCommandTimeoutExceptionwith a detail message given the timeout.static StringformatTimeout(Duration duration)
-
Method Details
-
createTimeoutException
Create aRedisCommandTimeoutExceptionwith a detail message given the timeout.- Parameters:
timeout- the timeout value.- Returns:
- the
RedisCommandTimeoutException.
-
createTimeoutException
public static RedisCommandTimeoutException createTimeoutException(String message, Duration timeout)Create aRedisCommandTimeoutExceptionwith a detail message given the message and timeout.- Parameters:
message- the detail message.timeout- the timeout value.- Returns:
- the
RedisCommandTimeoutException.
-
formatTimeout
-
createExecutionException
Create aRedisCommandExecutionExceptionwith a detail message. Specific Redis error messages may create subtypes ofRedisCommandExecutionException.- Parameters:
message- the detail message.- Returns:
- the
RedisCommandExecutionException.
-
createExecutionException
public static RedisCommandExecutionException createExecutionException(String message, Throwable cause)Create aRedisCommandExecutionExceptionwith a detail message and optionally acause. Specific Redis error messages may create subtypes ofRedisCommandExecutionException.- Parameters:
message- the detail message.cause- the nested exception, may benull.- Returns:
- the
RedisCommandExecutionException.
-