ReadonlynameAlways "EnvelopePatternError"; the cross-copy identity EnvelopePatternError.isEnvelopePatternError checks.
ReadonlycodeThe discriminant; equals details.code.
ReadonlydetailsThe structured payload, discriminated by code.
The span, if the error has one.
StaticisType guard for an EnvelopePatternError, including one from another copy of this package.
The message with the source line and a caret under the span.
Internal
The same error with its span moved by offset.
StaticemptyThe source is empty.
Readonlycode: "EmptyInput"The discriminant.
Readonlydetails: { code: "EmptyInput" }The payload of code.
Readonlycode: "EmptyInput"The discriminant.
StaticunexpectedThe source ended inside a pattern.
Readonlycode: "UnexpectedEndOfInput"The discriminant.
Readonlydetails: { code: "UnexpectedEndOfInput" }The payload of code.
Readonlycode: "UnexpectedEndOfInput"The discriminant.
StaticextraText follows the pattern.
StaticunexpectedA token that cannot start or continue a pattern here.
StaticunrecognizedText no token matches.
StaticinvalidA regex the dialect does not accept.
StaticunterminatedA regex or quoted literal without its closing delimiter.
StaticinvalidA {n,m} range that is not one, or with n above m.
StaticinvalidA hex literal that is not even-length hex of at most 32 bytes.
StaticinvalidA date'…' body that is not a date, a range of dates, or a regex.
StaticinvalidA number literal outside the 64-bit integer range.
StaticinvalidA digest(ur:…) body the UR decoder rejects.
StaticexpectedAn opening parenthesis was required.
StaticexpectedA closing parenthesis was required.
StaticexpectedAn opening bracket was required.
StaticexpectedA closing bracket was required.
StaticexpectedA pattern was required after an operator.
StaticunmatchedParentheses that do not pair.
StaticunmatchedBraces that do not pair.
StaticinvalidA capture name that is not an identifier.
StaticinvalidA cbor(…) body that is neither a value, a UR nor a dCBOR pattern.
StaticnestingA pattern nested deeper than maxDepth.
Thrown by
parseEnvelopePattern(and carried bytryParseEnvelopePattern) 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