Class LLMException

All Implemented Interfaces:
Serializable

public class LLMException extends RuntimeException
Runtime exception thrown when a Large Language Model (LLM) operation fails.

This exception indicates errors during LLM processing such as:

  • Communication failures with the LLM service
  • Invalid or malformed responses from the LLM (truncated output, error payloads, protocol-level failures)
  • Rate limiting or quota exceeded errors
  • Model unavailability or timeout
  • Response deserialization failures when a typed result is requested and the LLM response cannot be converted to the expected Java type

As a runtime exception, it does not require explicit handling but can be caught by HandleException annotated methods in agent workflows.

Since:
1.0
See Also:
  • Constructor Details

    • LLMException

      public LLMException(String message)
      Constructs a new LLM exception with the specified detail message.
      Parameters:
      message - The detail message.
    • LLMException

      public LLMException(String message, Throwable cause)
      Constructs a new LLM exception with the specified detail message and cause.
      Parameters:
      message - The detail message.
      cause - The cause (which is saved for later retrieval by the Throwable.getCause() method).
    • LLMException

      public LLMException(Throwable cause)
      Constructs a new LLM exception with the specified cause and a detail message of (cause==null ? null : cause.toString()).
      Parameters:
      cause - The cause (which is saved for later retrieval by the Throwable.getCause() method).