AgentToolErrorCode class final
One refusal kind: the stable E_… spelling every presentation reports and
the reason the audit trail records when the refusal carries no truer one.
A class rather than an enum so an application adds the codes its own tools need (AgentToolErrorCode.new) beside the general ones declared here, without a second exception type.
Constructors
- AgentToolErrorCode(String wire, String auditReason, {bool isFailure = false})
-
const
Properties
- auditReason → String
-
How the audit trail names a refusal with this code.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFailure → bool
-
Whether the code reports work that passed every gate and then did not
complete — a failure — rather than a refusal. The audit trail records the
two differently.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wire → String
-
The spelling on the wire,
E_and upper case.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- invalidArgument → const AgentToolErrorCode
- Schema violation, unknown tool, malformed argument.
- notFound → const AgentToolErrorCode
- The target does not exist for this caller. Identical whether the target is unknown or is excluded from the surface, so the surface is not an existence oracle.
- outOfScope → const AgentToolErrorCode
- Outside the invocation's scope. Names the gate that refused, never what the target is.
- readOnly → const AgentToolErrorCode
- A write under a read-only invocation.
- transactionFailed → const AgentToolErrorCode
- A step of the call failed and the call was rolled back.