} catch (BatchException e) {
throw e.getBatchUpdateException();
}
}
catch (SQLException ex) {
SQLExceptionTranslator sqlStateSQLExceptionTranslator;
if(dataSource != null) {
sqlStateSQLExceptionTranslator = new SQLStateSQLExceptionTranslator();
} else {
sqlStateSQLExceptionTranslator = new SQLErrorCodeSQLExceptionTranslator(dataSource);
}
throw sqlStateSQLExceptionTranslator.translate("SqlMapClient operation", null, ex);
}
// Processing finished - potentially session still to be closed.
}
finally {