Search in sources :

Example 1 with TransactionFailedException

use of org.skife.jdbi.v2.exceptions.TransactionFailedException in project dropwizard by dropwizard.

the class LoggingDBIExceptionMapperTest method testPlainDBIException.

@Test
public void testPlainDBIException() throws Exception {
    DBIException dbiException = new TransactionFailedException("Transaction failed for unknown reason");
    dbiExceptionMapper.logException(9812, dbiException);
    verify(logger).error("Error handling a request: 0000000000002654", dbiException);
}
Also used : DBIException(org.skife.jdbi.v2.exceptions.DBIException) TransactionFailedException(org.skife.jdbi.v2.exceptions.TransactionFailedException) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DBIException (org.skife.jdbi.v2.exceptions.DBIException)1 TransactionFailedException (org.skife.jdbi.v2.exceptions.TransactionFailedException)1