SpecialReturnException

abstract class SpecialReturnException(message: String, val type: Class<*>) : 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.

Parameters

message

The exception message. Informative only.

type

The expected return type of the action method.

Inheritors

Constructors

Link copied to clipboard
constructor(message: String, type: Class<*>)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?
Link copied to clipboard
val type: Class<*>

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun handle(actionContext: ActionContext): Any

Process the special return and produce the final result. This should be of the expected type, although Exception classes cannot be parameterized.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard