Elffuss BraidHub

kikocis/java-driver public

Suppress Unexpected error in onFailure if cancelled (JAVA-710).
Changesetf3143d46f7350abef4f0fdb3da01409b8c96aa3d573c96513f89bfae63db72a6
AuthorAndrew Tolbert <andrew.tolbert@datastax.com> · 2015-04-28 14:40 +02:00
CommitterAlexandre Dutra <alexandre.dutra@datastax.com> · 2015-06-11 19:18 +02:00
Parentsc98c3588aecb

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +2 −2
@@ -1518,7 +1518,7 @@
15181518 } catch (ExecutionException e) {
15191519 Throwable t = e.getCause();
15201520 // That future is not really supposed to throw unexpected exceptions
1521- if (!(t instanceof InterruptedException))
1521+ if (!(t instanceof InterruptedException) && !(t instanceof CancellationException))
15221522 logger.error("Unexpected error while marking node UP: while this shouldn't happen, this shouldn't be critical", t);
15231523 }
15241524
@@ -1789,7 +1789,7 @@
17891789 } catch (ExecutionException e) {
17901790 Throwable t = e.getCause();
17911791 // That future is not really supposed to throw unexpected exceptions
1792- if (!(t instanceof InterruptedException))
1792+ if (!(t instanceof InterruptedException) && !(t instanceof CancellationException))
17931793 logger.error("Unexpected error while adding node: while this shouldn't happen, this shouldn't be critical", t);
17941794 }
17951795