Skip to main content
Version: v0.0.8

Function: telecomWarning()

telecomWarning(code, position): NcpdpTelecomWarning

Construct a frozen NcpdpTelecomWarning from a code and a position.

There is deliberately no value parameter. That absence is the whole safety property: a factory that accepts a value grows interpolation sites, and every parser in this family that leaked patient data into a log line did so through one.

Parameters

code

TelecomWarningCode

The stable warning code, which selects the message.

position

TelecomPosition

Byte-offset location of the condition.

Returns

NcpdpTelecomWarning

A frozen warning.

Example

telecomWarning(TELECOM_WARNING_CODES.UNKNOWN_SEGMENT, telecomPosition(56, "AM"));