Search in sources :

Example 1 with SQLExceptionTypeDelegate

use of org.hibernate.exception.internal.SQLExceptionTypeDelegate in project hibernate-orm by hibernate.

the class JdbcEnvironmentImpl method buildSqlExceptionHelper.

@SuppressWarnings("deprecation")
private SqlExceptionHelper buildSqlExceptionHelper(Dialect dialect, boolean logWarnings) {
    final StandardSQLExceptionConverter sqlExceptionConverter = new StandardSQLExceptionConverter();
    sqlExceptionConverter.addDelegate(dialect.buildSQLExceptionConversionDelegate());
    sqlExceptionConverter.addDelegate(new SQLExceptionTypeDelegate(dialect));
    // todo : vary this based on extractedMetaDataSupport.getSqlStateType()
    sqlExceptionConverter.addDelegate(new SQLStateConversionDelegate(dialect));
    return new SqlExceptionHelper(sqlExceptionConverter, logWarnings);
}
Also used : StandardSQLExceptionConverter(org.hibernate.exception.internal.StandardSQLExceptionConverter) SQLStateConversionDelegate(org.hibernate.exception.internal.SQLStateConversionDelegate) SQLExceptionTypeDelegate(org.hibernate.exception.internal.SQLExceptionTypeDelegate) SqlExceptionHelper(org.hibernate.engine.jdbc.spi.SqlExceptionHelper)

Aggregations

SqlExceptionHelper (org.hibernate.engine.jdbc.spi.SqlExceptionHelper)1 SQLExceptionTypeDelegate (org.hibernate.exception.internal.SQLExceptionTypeDelegate)1 SQLStateConversionDelegate (org.hibernate.exception.internal.SQLStateConversionDelegate)1 StandardSQLExceptionConverter (org.hibernate.exception.internal.StandardSQLExceptionConverter)1