ReadonlynameAlways "DcborParseError"; the cross-copy identity DcborParseError.isDcborParseError checks.
ReadonlycodeThe discriminant; equals details.code.
ReadonlydetailsThe structured payload, discriminated by code.
The span, if the error has one.
StaticisType guard for a DcborParseError, including one from another copy of this package.
The message with the source line and a caret under the span.
StaticemptyThe source holds nothing but whitespace and comments.
Readonlycode: "EmptyInput"The discriminant.
Readonlydetails: { code: "EmptyInput" }The payload of code.
Readonlycode: "EmptyInput"The discriminant.
StaticunexpectedThe source ended inside an item.
Readonlycode: "UnexpectedEndOfInput"The discriminant.
Readonlydetails: { code: "UnexpectedEndOfInput" }The payload of code.
Readonlycode: "UnexpectedEndOfInput"The discriminant.
StaticextraText follows the first item.
StaticunexpectedA token that cannot start or continue an item here; text is its source text.
StaticunrecognizedText no token matches.
StaticexpectedTwo items in a container with nothing between them.
StaticexpectedA map key not followed by a colon.
StaticunmatchedA tag's content not followed by ).
StaticunmatchedA map not closed before the end of the source.
StaticexpectedA map entry without a value.
StaticinvalidA tag number outside the unsigned 64-bit range.
StaticunknownA tag name the tags store does not know.
StaticinvalidAn h'…' literal with an odd number of digits.
StaticinvalidA b64'…' literal that is not canonical base64.
StaticunknownA UR whose type has no tag in the tags store.
StaticinvalidA UR the decoder rejects.
StaticinvalidA known-value number outside the unsigned 64-bit range.
StaticunknownA known-value name the registry does not know.
Readonlycode: "UnknownKnownValueName"The discriminant.
Readonlydetails: { code: "UnknownKnownValueName"; span: Span; name: string }The payload of code.
Readonlycode: "UnknownKnownValueName"The discriminant.
Readonlyspan: SpanThe name inside the quotes.
Readonlyname: stringThe name that did not resolve.
StaticinvalidA date literal that is not a valid instant.
StaticduplicateA map key that appears twice.
StaticnestingA container or tag nested deeper than maxDepth.
Thrown by
parseDcborItemandparseDcborItemPartial(and carried by thetry…forms) for text that does not parse.codesays why;detailscarries the span and the code-specific fields;fullMessage(source)renders the message with the source line and a caret. Instances come from the static factories only.Example