@API(status=STABLE) public interface Exceptional extends Problem
Problem interface for problems that extend Exception. Since Exception
is a concrete type any class can only extend one exception type. ThrowableProblem is one choice, but we
don't want to force people to extend from this but choose their own super class. For this they can implement this
interface and get the same handling as ThrowableProblem for free. A common use case would be:
public final class OutOfStockException extends BusinessException implements Exceptional
Exception,
Problem,
ThrowableProblemDEFAULT_TYPE| Modifier and Type | Method and Description |
|---|---|
Exceptional |
getCause() |
default Exception |
propagate() |
default <X extends Throwable> |
propagateAs(Class<X> type) |
Copyright © 2015–2021 Zalando SE. All rights reserved.