@API(status=INTERNAL)
public interface AdviceTrait
Advice traits are simple interfaces that provide a single method with a default
implementation. They are used to provide ExceptionHandler implementations to be used in
Spring Controllers and/or in a ControllerAdvice. Clients can choose which traits they what to
use à la carte.
Advice traits are grouped in packages, based on they use cases. Every package has a composite advice trait that bundles all traits of that package.
| Modifier and Type | Method and Description |
|---|---|
default StackTraceElement[] |
createStackTrace(Throwable throwable) |
default boolean |
isCausalChainsEnabled() |
default org.zalando.problem.ProblemBuilder |
prepare(Throwable throwable,
org.zalando.problem.StatusType status,
URI type) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
process(org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity) |
default org.springframework.web.bind.annotation.ResponseStatus |
resolveResponseStatus(Throwable type) |
default org.zalando.problem.ThrowableProblem |
toProblem(Throwable throwable) |
default org.zalando.problem.ThrowableProblem |
toProblem(Throwable throwable,
org.zalando.problem.StatusType status) |
default org.zalando.problem.ThrowableProblem |
toProblem(Throwable throwable,
org.zalando.problem.StatusType status,
URI type) |
default org.zalando.problem.ThrowableProblem toProblem(Throwable throwable)
@API(status=MAINTAINED) default org.springframework.web.bind.annotation.ResponseStatus resolveResponseStatus(Throwable type)
default org.zalando.problem.ThrowableProblem toProblem(Throwable throwable, org.zalando.problem.StatusType status)
default org.zalando.problem.ThrowableProblem toProblem(Throwable throwable, org.zalando.problem.StatusType status, URI type)
default org.zalando.problem.ProblemBuilder prepare(Throwable throwable, org.zalando.problem.StatusType status, URI type)
default StackTraceElement[] createStackTrace(Throwable throwable)
default boolean isCausalChainsEnabled()
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> process(org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity)
Copyright © 2015–2020 Zalando SE. All rights reserved.