ConnectionFactoryUtils.convertR2dbcException(String, String, R2dbcException)
instead.@Deprecated public class SqlStateR2dbcExceptionTranslator extends AbstractFallbackR2dbcExceptionTranslator
R2dbcExceptionTranslator
implementation that analyzes the SQL state in the R2dbcException
based on
the first two digits (the SQL state "class"). Detects standard SQL state values and well-known vendor-specific SQL
states.
Not able to diagnose all problems, but is portable between databases and does not require special initialization (no
database vendor detection, etc.). For more precise translation, consider
SqlErrorCodeR2dbcExceptionTranslator
.
R2dbcException.getSqlState()
,
SqlErrorCodeR2dbcExceptionTranslator
logger
Constructor and Description |
---|
SqlStateR2dbcExceptionTranslator()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected DataAccessException |
doTranslate(String task,
String sql,
R2dbcException ex)
Deprecated.
Template method for actually translating the given exception.
|
buildMessage, getFallbackTranslator, setFallbackTranslator, translate
public SqlStateR2dbcExceptionTranslator()
@Nullable protected DataAccessException doTranslate(String task, @Nullable String sql, R2dbcException ex)
AbstractFallbackR2dbcExceptionTranslator
The passed-in arguments will have been pre-checked. Furthermore, this method is allowed to return null to indicate that no exception match has been found and that fallback translation should kick in.
doTranslate
in class AbstractFallbackR2dbcExceptionTranslator
task
- readable text describing the task being attempted.sql
- SQL query or update that caused the problem (if known).ex
- the offending R2dbcException
.R2dbcException
; or null if no exception match
found.Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.