Interface ErrorContext.Builder
- Enclosing interface:
- ErrorContext
public static interface ErrorContext.Builder
A builder for a
ErrorContext
.- Since:
- 2.4.0
- Author:
- James Kleeh
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the context.Sets the root cause of the error(s).Adds an error to the context.errorMessage
(@NonNull String message) Adds an error to the context for the given message.errorMessages
(@NonNull List<String> errors) Adds errors to the context for the given messages.Adds the errors to the context.
-
Method Details
-
cause
Sets the root cause of the error(s).- Parameters:
cause
- The root cause- Returns:
- This builder instance
-
errorMessage
Adds an error to the context for the given message.- Parameters:
message
- The message- Returns:
- This builder instance
-
error
Adds an error to the context.- Parameters:
error
- The message- Returns:
- This builder instance
-
errorMessages
Adds errors to the context for the given messages.- Parameters:
errors
- The errors- Returns:
- This builder instance
-
errors
Adds the errors to the context.- Parameters:
errors
- The errors- Returns:
- This builder instance
-
build
Builds the context.- Returns:
- A new context
-