Class PromptExecutionException.Builder<Instance,Builder>

java.lang.Object
de.xima.fc.prompt.service.PromptExecutionException.Builder<Instance,Builder>
Type Parameters:
Instance - The type of the exception subclass.
Builder - The type of the builder subclass.
Direct Known Subclasses:
ExecutionFailedException.Builder, InvalidConfigurationException.Builder, InvalidInputParamsException.Builder, InvalidOutputParamsException.Builder, MissingPromptServiceException.Builder, RateLimitExceededException.Builder, RequestRefusedException.Builder, ResponseRefusedException.Builder, ServiceUnavailableException.Builder, UnauthorizedPromptRequestException.Builder
Enclosing class:
PromptExecutionException

protected abstract static class PromptExecutionException.Builder<Instance,Builder> extends Object
Base builder class for prompt execution exceptions.
Since:
8.5.0
  • Field Details

  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • build

      public abstract Instance build()
      Creates the exception instance with the configured values.
      Returns:
      The created exception instance.
    • cause

      public final Builder cause(Throwable cause)
      Sets the cause of the exception.
      Parameters:
      cause - The cause of the exception.
      Returns:
      The builder instance.
    • message

      public final Builder message(String message)
      Sets the technical message for the exception.
      Parameters:
      message - The technical message.
      Returns:
      The builder instance.