Class LangChain4jException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AgenticSystemConfigurationException, AgentInvocationException, AnthropicStreamingException, AzureAiSearchRuntimeException, AzureCosmosDBNoSqlRuntimeException, BlankDocumentException, ElasticsearchRequestFailedException, GuardrailException, HttpException, IllegalConfigurationException, IllegalResponseException, McpException, McpRegistryClientException, ModelDisabledException, ModerationException, NonRetriableException, OllamaStreamingException, OpenSearchRequestFailedException, OutputParsingException, RetriableException, ToolArgumentsException, ToolExecutionException, UnsupportedFeatureException

public class LangChain4jException extends RuntimeException
The root unchecked exception for all LangChain4j-specific errors.

All library exceptions extend this class, making it the single catch point for callers that need to handle any LangChain4j error uniformly. For more targeted handling, prefer catching a specific subclass such as RetriableException or NonRetriableException.

See Also:
  • Constructor Details

    • LangChain4jException

      public LangChain4jException(String message)
    • LangChain4jException

      public LangChain4jException(Throwable cause)
    • LangChain4jException

      public LangChain4jException(String message, Throwable cause)