Skip to content

Commit be09603

Browse files
committed
Handle Throwable instead of RuntimeExceptoin in FailPoint.enable
1 parent 07da4e8 commit be09603

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

driver-sync/src/test/functional/com/mongodb/client/FailPoint.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ public static FailPoint enable(final BsonDocument configureFailPointDoc, final S
4848
.hosts(Collections.singletonList(serverAddress)))
4949
.build();
5050
MongoClient client = MongoClients.create(clientSettings);
51-
RuntimeException enableException = null;
51+
Throwable enableException = null;
5252
try {
5353
return enable(configureFailPointDoc, client);
54-
} catch (RuntimeException e) {
54+
} catch (Throwable e) {
5555
enableException = e;
5656
throw e;
5757
} finally {
5858
if (enableException != null) {
5959
try {
6060
disableAndClose(configureFailPointDoc, client);
61-
} catch (RuntimeException closeException) {
61+
} catch (Throwable closeException) {
6262
enableException.addSuppressed(closeException);
6363
}
6464
}

0 commit comments

Comments
 (0)