static CloseEvent newCloseEvent(Throwable cause) {
        if (cause == CancelledSubscriptionException.INSTANCE) {
            return CANCELLED_CLOSE;
        } else if (cause == AbortedStreamException.INSTANCE) {
            return ABORTED_CLOSE;
        } else {
            return new CloseEvent(cause);
        }
    }
Returns newly created {@link CloseEvent} if the specified {@link Throwable} is not an instance of
{@link CancelledSubscriptionException#INSTANCE} or {@link AbortedStreamException#INSTANCE}.
core/src/main/java/com/linecorp/armeria/common/stream/CancellableStreamMessage.java