WayfinderException class
A failure a host can act on: code is a stable kebab-case identifier, and message a sentence that says what happened and names no command (ADR-0018). The command line prints it and adds what to run; a host words its own remedy from the code and, where one is typed, the exception's data.
The project library throws these codes:
bundle-name-invalid,bundle-unknown,bundle-ambiguous,bundle-missing,bundle-escapes,bundles-missingandconfig-invalidwhile discovering a project's bundles;- the
DiagnosticCodevalue aWayfinderProfileResolutionExceptioncarries, such asprofile-unresolved, orprofile-timeoutwhen reading a Profile package ran past the resolver's bound; itsremedysays when selecting new revisions fixes it, and aProfileSkillDirectoriesExceptionnames the skill directoriesgetmay not replace; resolution-busy, aProfileResolutionBusyException, when anothergetholds the project's lock, or the Profile cache stays locked past its timeout;resolution-stalewhen the configuration, lock or Profile cache changed after a plan;fetch-required, aProfileFetchRequiredException, when a plan would clone or refresh a Profile source that the request is offline for or its fetch policy refused;lock-change-required, aProfileLockChangeRequiredException, when a locked-only plan or a relock would change whatwayfinder.lockpins;relock-failed, aProfileRelockFailedException, when a relock cannot read or replacewayfinder.jsonorwayfinder.lock;- from
package:wayfinder/adoption.dart:adoption-invalid,adoption-conflict,adoption-stale,adoption-failedandadoption-profile-conflict, anAdoptionProfileConflictException, when the request names another id than its Profile package declares; - from a
KnowledgeAssessmentInput.assessWithinthatauthoring.dartandadoption.dartexport:assessment-timeoutwhen a Profile assessment runs past its timeout, andassessment-failedwhen it stops on an error or cannot start; data-directory-unavailablewhen no data directory can be located;git-timeoutwhen a Git command writes nothing for its timeout, andgit-output-too-largewhen it writes more stdout than its limit;cancelledwhen aWayfinderCancellationstopped the operation; a host'sGitRunnerthrows WayfinderException.cancelled for it too.
package:wayfinder/authoring.dart adds write-refused, write-stale,
write-failed and the codes of its KnowledgeChangeException. Other
Wayfinder packages add their own codes.
- Implemented types
Constructors
- WayfinderException(String code, String message)
-
const
- WayfinderException.cancelled()
-
The
cancelledfailure of an operation aWayfinderCancellationstopped.const
Properties
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