类 ErrorEvent

java.lang.Object
io.agentscope.core.hook.HookEvent
io.agentscope.core.hook.ErrorEvent

public final class ErrorEvent extends HookEvent
Event fired when an error occurs during agent execution.

Modifiable: No (notification-only)

Context:

Use Cases:

  • Log errors with context
  • Send error notifications
  • Collect error metrics
  • Implement custom error handling
  • 构造器详细资料

    • ErrorEvent

      public ErrorEvent(Agent agent, Throwable error)
      Constructor for ErrorEvent.
      参数:
      agent - The agent instance (must not be null)
      error - The error that occurred (must not be null)
      抛出:
      NullPointerException - if agent or error is null
  • 方法详细资料

    • getError

      public Throwable getError()
      Get the error that occurred.
      返回:
      The error