本文整理了Java中java.util.concurrent.ExecutionException.addSuppressed()
方法的一些代码示例,展示了ExecutionException.addSuppressed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionException.addSuppressed()
方法的具体详情如下:
包路径:java.util.concurrent.ExecutionException
类名称:ExecutionException
方法名:addSuppressed
暂无
代码示例来源:origin: lettuce-io/lettuce-core
@Override
public <U> ConnectionFuture<U> thenCompose(BiFunction<? super T, ? super Throwable, ? extends CompletionStage<U>> fn) {
CompletableFuture<U> future = new CompletableFuture<>();
delegate.whenComplete((v, e) -> {
try {
CompletionStage<U> apply = fn.apply(v, e);
apply.whenComplete((u, t) -> {
if (t != null) {
future.completeExceptionally(t);
} else {
future.complete(u);
}
});
} catch (Exception ex) {
ExecutionException result = new ExecutionException("Exception while applying thenCompose", ex);
if (e != null) {
result.addSuppressed(e);
}
future.completeExceptionally(result);
}
});
return adopt(future);
}
代码示例来源:origin: neo4j/neo4j
for ( Throwable failure : failures )
exception.addSuppressed( failure );
代码示例来源:origin: io.lettuce/lettuce-core
@Override
public <U> ConnectionFuture<U> thenCompose(BiFunction<? super T, ? super Throwable, ? extends CompletionStage<U>> fn) {
CompletableFuture<U> future = new CompletableFuture<>();
delegate.whenComplete((v, e) -> {
try {
CompletionStage<U> apply = fn.apply(v, e);
apply.whenComplete((u, t) -> {
if (t != null) {
future.completeExceptionally(t);
} else {
future.complete(u);
}
});
} catch (Exception ex) {
ExecutionException result = new ExecutionException("Exception while applying thenCompose", ex);
if (e != null) {
result.addSuppressed(e);
}
future.completeExceptionally(result);
}
});
return adopt(future);
}
代码示例来源:origin: jenkinsci/pipeline-aws-plugin
e.addSuppressed(throwable);
内容来源于网络,如有侵权,请联系作者删除!