errors#
Classes#
InvalidManifestError#
Defined in: errors.ts:126
Thrown when a manifest fails the schema or an invariant at save time.
Extends#
Error
Constructors#
Constructor#
new InvalidManifestError(
problems):InvalidManifestError
Defined in: errors.ts:129
Parameters#
problems#
readonly Problem[]
Returns#
Overrides#
Error.constructor
Properties#
problems#
readonlyproblems: readonlyProblem[]
Defined in: errors.ts:127
JournalMismatchError#
Defined in: errors.ts:147
Thrown when replaying a workspace’s journal does not reproduce the view the
workspace holds: entry is the index of the first journal entry after
which the replayed view differs from what the snapshot implies, path the
first differing location in the view (["name"], ["graphical"] or
["blocks", <id>, ...]).
Extends#
Error
Constructors#
Constructor#
new JournalMismatchError(
entry,path):JournalMismatchError
Defined in: errors.ts:151
Parameters#
entry#
number
path#
readonly PathSegment[]
Returns#
Overrides#
Error.constructor
Properties#
entry#
readonlyentry:number
Defined in: errors.ts:148
path#
readonlypath: readonlyPathSegment[]
Defined in: errors.ts:149
Interfaces#
LoadError#
Defined in: errors.ts:94
Why manifest or workspace text was refused: every problem found.
Properties#
problems#
readonlyproblems: readonlyProblem[]
Defined in: errors.ts:95
Problem#
Defined in: errors.ts:84
One problem: a code from ErrorCode, a description, and the path of the
offending value.
For a load, the path points into the text read: into the manifest, or into
the workspace file (["blocks", <id>, "manifest", ...]). For a command,
it starts with the address key (addressKey) of the target at fault,
followed by the property at fault ([<address key>, "length"]) or, for
a value add puts in, by its kind and the location in the value
([<address key of into>, "timeline", "id"]). A problem of the manifest
the command would leave lies there instead: at the block’s ID, "manifest"
and the location in that manifest ([<block id>, "manifest", "timelines", 0, ...]). Only a malformed command, which has no target, names the
malformed member of the command itself.
Properties#
code#
readonlycode:ErrorCode
Defined in: errors.ts:85
message#
readonlymessage:string
Defined in: errors.ts:86
path#
readonlypath: readonlyPathSegment[]
Defined in: errors.ts:87
Type Aliases#
CommandError#
CommandError =
Problem
Defined in: errors.ts:91
Why a command was refused.
ErrorCode#
Defined in: errors.ts:9
One problem code: a value of the ErrorCode constants.
Variables#
ErrorCode#
constErrorCode:object
Defined in: errors.ts:9
Every problem code, as stable string constants.
Type Declaration#
arrangementConflict#
readonlyarrangementConflict:"arrangement_conflict"="arrangement_conflict"
childExceedsParent#
readonlychildExceedsParent:"child_exceeds_parent"="child_exceeds_parent"
computedFlowMap#
readonlycomputedFlowMap:"computed_flow_map"="computed_flow_map"
cycle#
readonlycycle:"cycle"="cycle"
duplicateId#
readonlyduplicateId:"duplicate_id"="duplicate_id"
duplicateIndex#
readonlyduplicateIndex:"duplicate_index"="duplicate_index"
elisionExceedsLength#
readonlyelisionExceedsLength:"elision_exceeds_length"="elision_exceeds_length"
elisionStretch#
readonlyelisionStretch:"elision_stretch"="elision_stretch"
elisionTimeline#
readonlyelisionTimeline:"elision_timeline"="elision_timeline"
idNotSettable#
readonlyidNotSettable:"id_not_settable"="id_not_settable"
invalidAddress#
readonlyinvalidAddress:"invalid_address"="invalid_address"
invalidBlockId#
readonlyinvalidBlockId:"invalid_block_id"="invalid_block_id"
invalidCommand#
readonlyinvalidCommand:"invalid_command"="invalid_command"
invalidCoordinate#
readonlyinvalidCoordinate:"invalid_coordinate"="invalid_coordinate"
invalidIndex#
readonlyinvalidIndex:"invalid_index"="invalid_index"
invalidJson#
readonlyinvalidJson:"invalid_json"="invalid_json"
invalidOrder#
readonlyinvalidOrder:"invalid_order"="invalid_order"
invalidValue#
readonlyinvalidValue:"invalid_value"="invalid_value"
invalidYaml#
readonlyinvalidYaml:"invalid_yaml"="invalid_yaml"
journalMismatch#
readonlyjournalMismatch:"journal_mismatch"="journal_mismatch"
keyMismatch#
readonlykeyMismatch:"key_mismatch"="key_mismatch"
lengthBelowContent#
readonlylengthBelowContent:"length_below_content"="length_below_content"
locked#
readonlylocked:"locked"="locked"
missingMember#
readonlymissingMember:"missing_member"="missing_member"
negativeChildOffset#
readonlynegativeChildOffset:"negative_child_offset"="negative_child_offset"
nestedMember#
readonlynestedMember:"nested_member"="nested_member"
noEditor#
readonlynoEditor:"no_editor"="no_editor"
nonFiniteNumber#
readonlynonFiniteNumber:"non_finite_number"="non_finite_number"
nonPositiveNumber#
readonlynonPositiveNumber:"non_positive_number"="non_positive_number"
notAnItem#
readonlynotAnItem:"not_an_item"="not_an_item"
notInside#
readonlynotInside:"not_inside"="not_inside"
notRemovable#
readonlynotRemovable:"not_removable"="not_removable"
parentCycle#
readonlyparentCycle:"parent_cycle"="parent_cycle"
regionEndBeforeStart#
readonlyregionEndBeforeStart:"region_end_before_start"="region_end_before_start"
schemaViolation#
readonlyschemaViolation:"schema_violation"="schema_violation"
segmentEndFixed#
readonlysegmentEndFixed:"segment_end_fixed"="segment_end_fixed"
segmentNeverLocked#
readonlysegmentNeverLocked:"segment_never_locked"="segment_never_locked"
segmentNotRemovable#
readonlysegmentNotRemovable:"segment_not_removable"="segment_not_removable"
segmentStructure#
readonlysegmentStructure:"segment_structure"="segment_structure"
sessionReferencedTwice#
readonlysessionReferencedTwice:"session_referenced_twice"="session_referenced_twice"
sideEffect#
readonlysideEffect:"side_effect"="side_effect"
timestampExceedsLength#
readonlytimestampExceedsLength:"timestamp_exceeds_length"="timestamp_exceeds_length"
unitMismatch#
readonlyunitMismatch:"unit_mismatch"="unit_mismatch"
unknownMember#
readonlyunknownMember:"unknown_member"="unknown_member"
unknownParent#
readonlyunknownParent:"unknown_parent"="unknown_parent"
unknownPlace#
readonlyunknownPlace:"unknown_place"="unknown_place"
unknownProperty#
readonlyunknownProperty:"unknown_property"="unknown_property"
unknownSession#
readonlyunknownSession:"unknown_session"="unknown_session"
unknownTarget#
readonlyunknownTarget:"unknown_target"="unknown_target"
unlockingNotSupported#
readonlyunlockingNotSupported:"unlocking_not_supported"="unlocking_not_supported"
unreferencedSession#
readonlyunreferencedSession:"unreferenced_session"="unreferenced_session"
unsupportedFormat#
readonlyunsupportedFormat:"unsupported_format"="unsupported_format"
unsupportedVersion#
readonlyunsupportedVersion:"unsupported_version"="unsupported_version"
wrongTargetKind#
readonlywrongTargetKind:"wrong_target_kind"="wrong_target_kind"
Functions#
assertNever()#
assertNever(
value):never
Defined in: errors.ts:168
The end of a closed switch over the kinds of a union: once every kind has
its case, value has the type never, so a kind added to the union later
fails to compile until the switch takes it. Reached at run time only
through a value its type does not admit; it then throws, naming the value’s
kind where it has one.
Parameters#
value#
never
Returns#
never
isCommandError()#
isCommandError(
value):value is Problem
Defined in: errors.ts:104
Whether a result of apply, dispatch or parseCommand is a refusal.
Parameters#
value#
unknown
Returns#
value is Problem
isLoadError()#
isLoadError(
value):value is LoadError
Defined in: errors.ts:116
Whether a manifest or workspace load result is a refusal.
Parameters#
value#
unknown
Returns#
value is LoadError
problem()#
problem(
code,message,path):Problem
Defined in: errors.ts:99
A problem with the given code, description and path.
Parameters#
code#
message#
string
path#
readonly PathSegment[]