Function: scriptWarning()
scriptWarning(
code,position):NcpdpScriptWarning
Construct a frozen NcpdpScriptWarning 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
The stable warning code, which selects the message.
position
XPath-style location of the condition.
Returns
A frozen warning.
Example
scriptWarning(SCRIPT_WARNING_CODES.VERSION_ABSENT, scriptPosition("/Message"));