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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Class<?> getType()
      abstract Object handle(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
    • Constructor Detail

      • SpecialReturnException

        SpecialReturnException(String message, Class<?> type)
        Parameters:
        message - The exception message.
        type - The expected return type of the action method.
    • 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.