Search in sources :

Example 1 with R2dbcDataIntegrityViolationException

use of io.r2dbc.spi.R2dbcDataIntegrityViolationException in project spring-framework by spring-projects.

the class ConnectionFactoryUtilsUnitTests method shouldTranslateIntegrityViolationException.

@Test
public void shouldTranslateIntegrityViolationException() {
    Exception exception = ConnectionFactoryUtils.convertR2dbcException("", "", new R2dbcDataIntegrityViolationException());
    assertThat(exception).isInstanceOf(DataIntegrityViolationException.class);
}
Also used : R2dbcDataIntegrityViolationException(io.r2dbc.spi.R2dbcDataIntegrityViolationException) R2dbcDataIntegrityViolationException(io.r2dbc.spi.R2dbcDataIntegrityViolationException) ConcurrencyFailureException(org.springframework.dao.ConcurrencyFailureException) R2dbcException(io.r2dbc.spi.R2dbcException) R2dbcRollbackException(io.r2dbc.spi.R2dbcRollbackException) R2dbcTransientResourceException(io.r2dbc.spi.R2dbcTransientResourceException) UncategorizedR2dbcException(org.springframework.r2dbc.UncategorizedR2dbcException) R2dbcTimeoutException(io.r2dbc.spi.R2dbcTimeoutException) R2dbcBadGrammarException(io.r2dbc.spi.R2dbcBadGrammarException) QueryTimeoutException(org.springframework.dao.QueryTimeoutException) BadSqlGrammarException(org.springframework.r2dbc.BadSqlGrammarException) R2dbcPermissionDeniedException(io.r2dbc.spi.R2dbcPermissionDeniedException) TransientDataAccessResourceException(org.springframework.dao.TransientDataAccessResourceException) DataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException) DataAccessResourceFailureException(org.springframework.dao.DataAccessResourceFailureException) PermissionDeniedDataAccessException(org.springframework.dao.PermissionDeniedDataAccessException) R2dbcNonTransientResourceException(io.r2dbc.spi.R2dbcNonTransientResourceException) Test(org.junit.jupiter.api.Test)

Aggregations

R2dbcBadGrammarException (io.r2dbc.spi.R2dbcBadGrammarException)1 R2dbcDataIntegrityViolationException (io.r2dbc.spi.R2dbcDataIntegrityViolationException)1 R2dbcException (io.r2dbc.spi.R2dbcException)1 R2dbcNonTransientResourceException (io.r2dbc.spi.R2dbcNonTransientResourceException)1 R2dbcPermissionDeniedException (io.r2dbc.spi.R2dbcPermissionDeniedException)1 R2dbcRollbackException (io.r2dbc.spi.R2dbcRollbackException)1 R2dbcTimeoutException (io.r2dbc.spi.R2dbcTimeoutException)1 R2dbcTransientResourceException (io.r2dbc.spi.R2dbcTransientResourceException)1 Test (org.junit.jupiter.api.Test)1 ConcurrencyFailureException (org.springframework.dao.ConcurrencyFailureException)1 DataAccessResourceFailureException (org.springframework.dao.DataAccessResourceFailureException)1 DataIntegrityViolationException (org.springframework.dao.DataIntegrityViolationException)1 PermissionDeniedDataAccessException (org.springframework.dao.PermissionDeniedDataAccessException)1 QueryTimeoutException (org.springframework.dao.QueryTimeoutException)1 TransientDataAccessResourceException (org.springframework.dao.TransientDataAccessResourceException)1 BadSqlGrammarException (org.springframework.r2dbc.BadSqlGrammarException)1 UncategorizedR2dbcException (org.springframework.r2dbc.UncategorizedR2dbcException)1