VeChainNetworkException class

Exception thrown when a VeChain network definition is invalid.

Why this exists: a network definition is the root of everything the SDK does. Its chain tag is embedded in every transaction to prevent cross-chain replay, and its node URL is where every request goes. A malformed genesis ID or node URL must fail loudly at creation time, with a message that says exactly what is wrong, instead of producing a network that silently signs transactions for the wrong chain or sends requests nowhere.

Keeping this as its own type (rather than a generic ArgumentError) lets calling code catch configuration problems specifically and tell them apart from other SDK failures.

Example:

try {
  VeChainNetwork.custom(
    name: 'my-node',
    genesisId: '0x1234',
    nodeUrl: 'https://my-node.example.com',
  );
} on VeChainNetworkException catch (e) {
  print(e.message); // Invalid genesis ID "0x1234": ...
}
Implemented types

Constructors

VeChainNetworkException(String message)
Creates a new VeChainNetworkException with the given message.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
message → String
A human-readable description of what went wrong.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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