Package com.aispect.api
Interface AiExceptionProxy<T,R>
- Type Parameters:
T- Input parameter types for method callsR- 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.
Exception orchestration agent interface for agents.
Triggered when an exception occurs during method execution AI Interceptor proxy logic.
-
Method Summary
Modifier and TypeMethodDescriptiononException(AiInvocationContext<T> ctx, Throwable ex) Called when the original method execution throws an exception, used for exception recovery, log collection, or downgrade response.
-
Method Details
-
onException
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 callex- Exceptions thrown by native methods- Returns:
- Return result after downgrade
- Throws:
AiSpectException- Exception that continues to be thrown when it cannot be handled
-