Skip to content

Commit

Permalink
Code improvement
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Beikov <[email protected]>
  • Loading branch information
maesenka and beikov authored Oct 24, 2024
1 parent 3dd701f commit b93582a
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1090,11 +1090,9 @@ public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
}
return switch (sqlState) {
// Serialization Exception
case "40001" -> {
if ( message.contains("WriteTooOldError") )
yield new TransactionSerializationException( message, sqlException, sql );
else yield null;
}
case "40001" -> message.contains("WriteTooOldError")
? new TransactionSerializationException( message, sqlException, sql );
: null;
// DEADLOCK DETECTED
case "40P01" -> new LockAcquisitionException( message, sqlException, sql );
// LOCK NOT AVAILABLE
Expand Down

0 comments on commit b93582a

Please sign in to comment.