List of usage examples for java.util.concurrent CompletionException getCause
public synchronized Throwable getCause()
From source file:org.trellisldp.http.impl.BaseTestHandler.java
protected void unwrapAsyncError(final CompletionStage async) { try {/*w w w .ja v a2 s. c o m*/ async.toCompletableFuture().join(); } catch (final CompletionException ex) { if (ex.getCause() instanceof WebApplicationException) { throw (WebApplicationException) ex.getCause(); } throw ex; } }