AimuxException class

Base class for all aimux engine / binding failures.

Catch this for any structured failure; use subclasses for specific handling (on APICallError, on AimuxTimeoutError, …). HTTP-shaped failures are all APICallError — branch on status (401 auth, 404 model, 429 rate limit).

Fields mirror C AimuxError / core helpers:

  • status: HTTP status, or -1
  • retryMs: rate-limit hint, or -1 (0 = retry now)
  • message: human-readable text
  • errorValue: raw lossless core-error JSON, or null
Implemented types
Implementers

Constructors

AimuxException(String message, {int code = AimuxErrorCode.other, int status = -1, int retryMs = -1, String? errorValue})
AimuxException.fromC(AimuxCError e)
Build the typed subclass from a filled C AimuxCError.
factory
AimuxException.fromCode(int code, String message, {int status = -1, int retryMs = -1, String? errorValue})
Dispatch code → concrete subclass (defaults for status when -1).
factory

Properties

code int
Machine-readable kind (AimuxErrorCode constants).
final
codeName String
Core error_type() name for code.
no setter
errorValue String?
Raw lossless core-error JSON (externally-tagged AiMuxError), or null when absent (e.g. FFI-synthesized failures). No parsing is done.
final
hashCode int
The hash code for this object.
no setterinherited
message String
Human-readable failure text.
final
retryMs int
Rate-limit hint in ms; -1 if none; 0 means retry immediately.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status int
HTTP status when known; otherwise -1.
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