public abstract class ExceptionFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
static RedisCommandExecutionException |
createExecutionException(String message)
Create a
RedisCommandExecutionException with a detail message. |
static RedisCommandExecutionException |
createExecutionException(String message,
Throwable cause)
Create a
RedisCommandExecutionException with a detail message and optionally a cause. |
static RedisCommandTimeoutException |
createTimeoutException(Duration timeout)
Create a
RedisCommandTimeoutException with a detail message given the timeout. |
static RedisCommandTimeoutException |
createTimeoutException(String message,
Duration timeout)
Create a
RedisCommandTimeoutException with a detail message given the message and timeout. |
static String |
formatTimeout(Duration duration) |
static boolean |
isUnknownCommandError(Throwable error)
Check whether an error reply indicates that the server does not know the command or subcommand that was sent.
|
public static RedisCommandTimeoutException createTimeoutException(Duration timeout)
RedisCommandTimeoutException with a detail message given the timeout.timeout - the timeout value.RedisCommandTimeoutException.public static RedisCommandTimeoutException createTimeoutException(String message, Duration timeout)
RedisCommandTimeoutException with a detail message given the message and timeout.message - the detail message.timeout - the timeout value.RedisCommandTimeoutException.public static RedisCommandExecutionException createExecutionException(String message)
RedisCommandExecutionException with a detail message. Specific Redis error messages may create subtypes
of RedisCommandExecutionException.message - the detail message.RedisCommandExecutionException.public static RedisCommandExecutionException createExecutionException(String message, Throwable cause)
RedisCommandExecutionException with a detail message and optionally a cause. Specific
Redis error messages may create subtypes of RedisCommandExecutionException.message - the detail message.cause - the nested exception, may be null.RedisCommandExecutionException.public static boolean isUnknownCommandError(Throwable error)
Matches the shapes Redis and Redis-compatible servers use for this condition, which differ in wording and word order:
ERR unknown command 'CLIENT', with args beginning with: ...,
ERR Unknown subcommand or wrong number of arguments for 'MYID' and the Redis Enterprise discovery service's
ERR sentinel unknown command. The words are therefore not required to be adjacent, and unknown is matched
case-insensitively. The ERR prefix is not, since Redis error codes are uppercase by convention.
error - the error to inspect, may be null.true if error is a Redis error reply reporting an unknown command or subcommand.Copyright © 2026 lettuce.io. All rights reserved.