Skip to content

Commit

Permalink
focus on transient error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffery-Wasty committed Sep 19, 2024
1 parent 4e61b54 commit 8178088
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2009,11 +2009,17 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
throw e;
} else {
System.out.println("---------------------Entered else(2)---------------------");

System.out.println("--------------------Error info--------------------------");
System.out.println(e.getSQLServerError());
System.out.println(e.getMessage());
System.out.println(e.getDriverErrorCode());
System.out.println(e.toString());

// only retry if transient error
SQLServerError sqlServerError = e.getSQLServerError();
if (!TransientError.isTransientError(sqlServerError)) {
System.out.println("----------------------THROW ON NON-TRANSIENT ERROR--------------------");
System.out.println(e.getSQLServerError());
System.out.println("----------------------ABOVE IS NON-TRANSIENT ERROR--------------------");
throw e;
}

Expand Down

0 comments on commit 8178088

Please sign in to comment.