use of com.webpieces.http2engine.impl.shared.data.NoTransitionStreamError in project webpieces by deanhiller.
the class Level5AStates method translateException.
private CompletableFuture<Void> translateException(Stream stream, Throwable t) {
CompletableFuture<Void> fut = new CompletableFuture<>();
if (t instanceof NoTransitionConnectionError)
fut.completeExceptionally(new ConnectionException(CancelReasonCode.BAD_FRAME_RECEIVED_FOR_THIS_STATE, logId, stream.getStreamId(), t.getMessage(), t));
else if (t instanceof NoTransitionStreamError)
fut.completeExceptionally(new StreamException(CancelReasonCode.CLOSED_STREAM, logId, stream.getStreamId(), t.getMessage(), t));
else
fut.completeExceptionally(t);
return fut;
}
Aggregations