类 ErrorEvent
java.lang.Object
io.agentscope.core.hook.HookEvent
io.agentscope.core.hook.ErrorEvent
Event fired when an error occurs during agent execution.
Modifiable: No (notification-only)
Context:
HookEvent.getAgent()- The agent instanceHookEvent.getMemory()- Agent's memorygetError()- The error that occurred
Use Cases:
- Log errors with context
- Send error notifications
- Collect error metrics
- Implement custom error handling
-
构造器概要
构造器 -
方法概要
从类继承的方法 io.agentscope.core.hook.HookEvent
getAgent, getMemory, getTimestamp, getType
-
构造器详细资料
-
ErrorEvent
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
Get the error that occurred.- 返回:
- The error
-