public final class ProtocolException extends R2dbcNonTransientResourceException
ProtocolException is thrown, then the underlying transport connection is closed.| Modifier and Type | Field and Description |
|---|---|
static int |
DRIVER_ERROR_FROM_DATABASE |
static int |
DRIVER_ERROR_INTERMITTENT_TLS_FAILED |
static int |
DRIVER_ERROR_INVALID_TDS |
static int |
DRIVER_ERROR_IO_FAILED |
static int |
DRIVER_ERROR_NONE |
static int |
DRIVER_ERROR_SSL_FAILED |
static int |
DRIVER_ERROR_UNSUPPORTED_CONFIG |
static int |
ERROR_QUERY_TIMEOUT |
static int |
ERROR_SOCKET_TIMEOUT |
| Constructor and Description |
|---|
ProtocolException(String reason)
Creates a new exception.
|
ProtocolException(String reason,
int driverErrorCode)
Creates a new exception.
|
ProtocolException(String reason,
Throwable cause)
Creates a new exception.
|
ProtocolException(String reason,
Throwable cause,
int driverErrorCode)
Creates a new exception.
|
| Modifier and Type | Method and Description |
|---|---|
static ProtocolException |
invalidTds(String reason)
Create a new
ProtocolException for invalid TDS. |
static ProtocolException |
unsupported(String reason)
Create a new
ProtocolException for an unsupported configuration. |
static ProtocolException |
unsupported(Throwable cause)
Create a new
ProtocolException for an unsupported configuration. |
getErrorCode, getSql, getSqlState, toStringaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic static final int DRIVER_ERROR_NONE
public static final int DRIVER_ERROR_FROM_DATABASE
public static final int DRIVER_ERROR_IO_FAILED
public static final int DRIVER_ERROR_INVALID_TDS
public static final int DRIVER_ERROR_SSL_FAILED
public static final int DRIVER_ERROR_UNSUPPORTED_CONFIG
public static final int DRIVER_ERROR_INTERMITTENT_TLS_FAILED
public static final int ERROR_SOCKET_TIMEOUT
public static final int ERROR_QUERY_TIMEOUT
public ProtocolException(@Nullable String reason)
reason - the reason for the error. Set as the exception's message and retrieved with Throwable.getMessage().public ProtocolException(@Nullable String reason, int driverErrorCode)
reason - the reason for the error. Set as the exception's message and retrieved with Throwable.getMessage().driverErrorCode - the driver error code.public ProtocolException(@Nullable String reason, @Nullable Throwable cause)
reason - the reason for the error. Set as the exception's message and retrieved with Throwable.getMessage().cause - the cause.public ProtocolException(@Nullable String reason, @Nullable Throwable cause, int driverErrorCode)
reason - the reason for the error. Set as the exception's message and retrieved with Throwable.getMessage().cause - the cause.driverErrorCode - the driver error code.public static ProtocolException invalidTds(String reason)
ProtocolException for invalid TDS.reason - the reason for the error. Set as the exception's message and retrieved with Throwable.getMessage().ProtocolException.public static ProtocolException unsupported(String reason)
ProtocolException for an unsupported configuration.reason - the reason for the error. Set as the exception's message and retrieved with Throwable.getMessage().ProtocolException.public static ProtocolException unsupported(Throwable cause)
ProtocolException for an unsupported configuration.cause - the cause.ProtocolException.Copyright © 2023. All rights reserved.