Class: NcpdpTelecomParseError
Thrown when NCPDP Telecommunication-standard input is structurally unrecoverable.
Carries a stable TelecomFatalCode and optional positional context, and
nothing else. message is the TELECOM_FATAL_MESSAGES entry for the
code, and it intentionally carries no snippet of the offending bytes: a
Telecom message is PHI-dense, so the TelecomPosition (offset + field
id, never a value) is the only context.
Example
try {
parseTelecom("");
} catch (err) {
if (err instanceof NcpdpTelecomParseError) {
err.code; // "EMPTY_INPUT"
}
}
Extends
Error
Constructors
Constructor
new NcpdpTelecomParseError(
code,opts?):NcpdpTelecomParseError
Parameters
code
The stable fatal code, which selects the message.
opts?
Optional positional context.
position?
Returns
NcpdpTelecomParseError
Overrides
Error.constructor
Properties
code
readonlycode:TelecomFatalCode
Stable, machine-readable fatal code.
position?
readonlyoptionalposition?:TelecomPosition
Byte-offset context of the failure, when known.