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