ConnectionError class final

Error during database connection establishment or maintenance.

Can indicate:

  • Invalid credentials
  • Server unreachable
  • Connection timeout
  • ODBC driver not found
  • Network issues

Generally NOT retryable, except if SQLSTATE starts with '08' (connection errors). In that case, check isRetryable before retrying.

Inheritance

Constructors

ConnectionError({required String message, String? sqlState, int? nativeCode})
Creates a new ConnectionError instance.
const

Properties

category → ErrorCategory
Returns the error category for decision-making.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isConnectionError → bool
Returns true if this is a connection-related error.
no setterinherited
isRetryable → bool
Returns true if the error is transient and may be retried.
no setterinherited
message → String
Human-readable error message describing what went wrong.
finalinherited
nativeCode → int?
Native error code from the database driver.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sqlState → String?
SQLSTATE from ODBC error (e.g., '42S02' for table not found).
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited