CommandAlreadyRegistered class
Raised by CommandRegistry.register when an app tries to register a
command whose (ownerApp, name) key is already registered.
This is the namespacing rule from FR-009 edge case 2 at registration time:
the same app re-registering the same command is a bug; two different apps
registering the same command name coexist under different ownerApps.
- Inheritance
-
- Object
- CliEdgeCaseException
- CommandAlreadyRegistered
- Available extensions
Constructors
- CommandAlreadyRegistered(RegistryKey key, {String? existingVersion})
-
const
Properties
- code → String
-
The error code, one of the CliExitCodes vocabulary names as a string
(e.g.
'notFound','conflict'). Used in the JSON error shape'scodefield and translated to the contract exit code by CliApp.no setteroverride -
details
→ Map<
String, Object?> -
Additional context for the JSON error shape's
detailsfield.no setteroverride - existingVersion → String?
-
The version of the existing registration, for diagnostics.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → RegistryKey
-
The key that was already registered.
final
- message → String
-
Human-readable error message.
no setteroverride
- 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
-
toFailure(
[StackTrace? stackTrace]) → AppFailure -
Available on Exception, provided by the ExceptionToFailure extension
Convert this exception to an AppFailure -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited