Interface AiExceptionProxy<T,R>

Type Parameters:
T - Input parameter types for method calls
R - Expected return result type of method call
All Known Subinterfaces:
AiUnitAgentHandler<T,R>
All Known Implementing Classes:
AbstractUnitAgent, ContentModerationAgent, DataCleanAgent, FallbackAgent, ImageProcessAgent, ImageStoryAgent, JsonExtractorAgent
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AiExceptionProxy<T,R>
Exception orchestration agent interface for agents.

Triggered when an exception occurs during method execution AI Interceptor proxy logic.

  • Method Summary

    Modifier and Type
    Method
    Description
    Called when the original method execution throws an exception, used for exception recovery, log collection, or downgrade response.
  • Method Details

    • onException

      R onException(AiInvocationContext<T> ctx, Throwable ex) throws AiSpectException
      Called when the original method execution throws an exception, used for exception recovery, log collection, or downgrade response.
      Parameters:
      ctx - The interception context for the current method call
      ex - Exceptions thrown by native methods
      Returns:
      Return result after downgrade
      Throws:
      AiSpectException - Exception that continues to be thrown when it cannot be handled