Interface ErrorContext.Builder

Enclosing interface:
ErrorContext

public static interface ErrorContext.Builder
A builder for a ErrorContext.
Since:
2.4.0
Author:
James Kleeh
  • Method Details

    • cause

      ErrorContext.Builder cause(@Nullable Throwable cause)
      Sets the root cause of the error(s).
      Parameters:
      cause - The root cause
      Returns:
      This builder instance
    • errorMessage

      ErrorContext.Builder errorMessage(String message)
      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

      ErrorContext.Builder errorMessages(List<String> errors)
      Adds errors to the context for the given messages.
      Parameters:
      errors - The errors
      Returns:
      This builder instance
    • errors

      ErrorContext.Builder errors(List<Error> errors)
      Adds the errors to the context.
      Parameters:
      errors - The errors
      Returns:
      This builder instance
    • build

      ErrorContext build()
      Builds the context.
      Returns:
      A new context