Throwable (Throwable throwable1, Throwable throwable2) { Throwable result; if (throwable1 == null) { result = throwable2; } else if (throwable2 == null) { result = throwable1; } else { // any exception wins over PCE because the latter can be induced by canceled indicator because of the former result = throwable1 instanceof ProcessCanceledException ? throwable2 : throwable1; } return result; }