Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This snippet is used when an error is identified, typically when checking if supplied parameters are valid. You may use ProcessBreak to stop code execution immediately or you may proceed with error checking and stack all eventual error messages.

Prolog:

Code Block
IF( pVersion @= '' );
    nErrors = nErrors + 1;
    sMessage = 'Parameter pVersion must not be empty.';
    sSequenceID = NumberToString( nMultiMsgJSON );
    sMessageJSON = INSRT(' "message":"', sMessage | '"', 1);
    sMultiMsg = Expand( '%sMultiMsg%' | If(LONG(sMultiMsg)=0, '', ', ') | '"' | NumberToString( nMultiMsgJSON ) | '":{%sMessageJSON%}' ); nMultiMsgJSON = nMultiMsgJSON + 1;
    LogOutput( cMsgErrorLevel, Expand( cMsgErrorContent ) );
    ProcessBreak;
EndIf;

...