Skip to content

Commit 8e2d1a1

Browse files
committed
HHH-9166 handle nested exceptions with TemplatedViolatedConstraintNameExtracte - fixed bad braces
1 parent aa0aa0b commit 8e2d1a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hibernate-core/src/main/java/org/hibernate/exception/spi/TemplatedViolatedConstraintNameExtracter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ public String extractConstraintName(SQLException sqle) {
2828
if (sqle.getNextException() == null
2929
|| sqle.getNextException() == sqle) {
3030
break;
31-
} else {
31+
}
32+
else {
3233
sqle = sqle.getNextException();
3334
}
3435
} while (constraintName == null);
3536

3637
return constraintName;
37-
} catch (NumberFormatException nfe) {
38+
}
39+
catch (NumberFormatException nfe) {
3840
return null;
3941
}
4042
}

0 commit comments

Comments
 (0)