Fix exception type check order bug
@@ -231,12 +231,12 @@ public class PulsarClientException extends IOException {
return (PulsarClientException) t;
} else if (t instanceof RuntimeException) {
throw (RuntimeException) t;
- } else if (!(t instanceof ExecutionException)) {
- // Generic exception
- return new PulsarClientException(t);
} else if (t instanceof InterruptedException) {
Thread.currentThread().interrupt();
return new PulsarClientException(t);
+ } else if (!(t instanceof ExecutionException)) {
+ // Generic exception
+ return new PulsarClientException(t);
}
// Unwrap the exception to keep the same exception type but a stack trace that includes the application calling
