logTranslation(task, sql, sqlExToUse, false);
return new DataAccessResourceFailureException(buildMessage(task, sql, sqlExToUse), sqlExToUse);
}
else if (Arrays.binarySearch(this.sqlErrorCodes.getPermissionDeniedCodes(), errorCode) >= 0) {
logTranslation(task, sql, sqlExToUse, false);
return new PermissionDeniedDataAccessException(buildMessage(task, sql, sqlExToUse), sqlExToUse);
}
else if (Arrays.binarySearch(this.sqlErrorCodes.getDataIntegrityViolationCodes(), errorCode) >= 0) {
logTranslation(task, sql, sqlExToUse, false);
return new DataIntegrityViolationException(buildMessage(task, sql, sqlExToUse), sqlExToUse);
}