Class: NcpdpTelecomParseError
Thrown when NCPDP Telecommunication-standard input is structurally unrecoverable.
Carries a stable TelecomFatalCode and optional positional context. It intentionally never carries a snippet of the offending bytes: a Telecom message is PHI-dense and a byte-level snippet could leak a value, 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,message,opts?):NcpdpTelecomParseError
Parameters
code
The stable fatal code.
message
string
Human-readable, PHI-free description.
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.