public SELF onException(Class<? extends Throwable> exception) {
        requireNonNull(exception, "exception");
        return onException((unused, ex) -> exception.isInstance(ex));
    }
Adds the specified exception type.

<p>When this is used for a {@link CircuitBreakerRule}, and the raised exception is an instance of the
specified {@code exception}, a {@link Response} is reported as a success or failure to a
{@link CircuitBreaker} or ignored depending on the build methods({@code #thenSuccess()},
{@code #thenFailure()} and {@code #thenIgnore()}).
core/src/main/java/com/linecorp/armeria/client/AbstractRuleBuilder.java