Package com.embabel.agent.api.annotation
Class SpecialReturnException
-
- All Implemented Interfaces:
-
java.io.Serializable
public abstract class SpecialReturnException extends RuntimeException
Superclass for exceptions thrown by special return mechanisms like subagent execution. These exceptions are caught by the agent runtime to handle the special return. Throwing exceptions allows us to retain strong typing in the action method signatures.
-
-
Constructor Summary
Constructors Constructor Description SpecialReturnException(String message, Class<?> type)
-
Method Summary
Modifier and Type Method Description final Class<?>getType()abstract Objecthandle(ActionContext actionContext)Process the special return and produce the final result. -
Methods inherited from class kotlin.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
handle
abstract Object handle(ActionContext actionContext)
Process the special return and produce the final result. This should be of the expected type, although Exception classes cannot be parameterized.
-
-
-
-