project BLF > class Housekeeping > method SetMessage

Description

Write error messages. This method is defined so that the standard call to SetMessage from the rest of the component code can be used.


Parameters


icMessageinputcharacterThe actual message, can contain $1, $2, ... for values that are situation-dependent.
icArgumentsinputcharacterchr(2) seperated list of values to replace $1, $2, ... in the message with. These values should not be translatable.
icFieldNameinputcharacterdummy parameter for keeping this method compatible with business.SetMessage
icFieldValueinputcharacterdummy parameter for keeping this method compatible with business.SetMessage
icTypeinputcharacterdummy parameter for keeping this method compatible with business.SetMessage
iiSeverityinputintegerdummy parameter for keeping this method compatible with business.SetMessage
icRowidinputcharacterdummy parameter for keeping this method compatible with business.SetMessage
icFcMsgNumberinputcharacter
icFcExplanationinputcharacter
icFcIdentificationinputcharacter
icFcContextinputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program1/housekeeping.p)

/* replace the non-translatable arguments */
do viCnt = 1 to 9:
    if num-entries(icArguments,chr(2)) < viCnt
    or entry(viCnt,icArguments,chr(2)) = ?
    then assign icMessage = replace (icMessage,
                                      "$":U + string(viCnt),
                                      "").
    else assign icMessage = replace (icMessage,
                                      "$":U + string(viCnt),
                                      entry(viCnt,icArguments,chr(2))).
end.

output to value (session:temp-dir + "Housekeeping-errors.txt":U) append.
put unformatted string(now) "    " icMessage skip.
output close.