public static interface ErrorContext.Builder
ErrorContext
.Modifier and Type | Method and Description |
---|---|
ErrorContext |
build()
Builds the context.
|
ErrorContext.Builder |
cause(java.lang.Throwable cause)
Sets the root cause of the error(s).
|
ErrorContext.Builder |
error(Error error)
Adds an error to the context.
|
ErrorContext.Builder |
errorMessage(java.lang.String message)
Adds an error to the context for the given message.
|
ErrorContext.Builder |
errorMessages(java.util.List<java.lang.String> errors)
Adds errors to the context for the given messages.
|
ErrorContext.Builder |
errors(java.util.List<Error> errors)
Adds the errors to the context.
|
@NonNull ErrorContext.Builder cause(@Nullable java.lang.Throwable cause)
cause
- The root cause@NonNull ErrorContext.Builder errorMessage(@NonNull java.lang.String message)
message
- The message@NonNull ErrorContext.Builder error(@NonNull Error error)
error
- The message@NonNull ErrorContext.Builder errorMessages(@NonNull java.util.List<java.lang.String> errors)
errors
- The errors@NonNull ErrorContext.Builder errors(@NonNull java.util.List<Error> errors)
errors
- The errors@NonNull ErrorContext build()