void = LogMessage(sMessage)
Use the LogMessage macro function to generate your own run-time messages during the execution of a Macro, without interrupting the flow of the macro. The parameter sMessage can be any string litteral, variable or expression.
LogMessage('Reaching first holiday')
Note that you do not need to include a lot of context information in sMessage because Q++Studio automatically appends to your message detailed information about the context in which the error was generated; The above example was generated with sMessage being simply 'Reaching first holiday'.
The context information that is appended to sMessage is : the page number, the date of the token, the token being evaluated, and the origin of that token. The origin of the token may be different than the token itself, if tokens are used recursively. In the example above, the current token is [a4*5d], but one sees that actually this token came from the evaluation of the [4*1*5d] token. The origin is the exact text that is in your GridTemplate.
If you wish the current macro to be aborted or even the entire diary generation to be aborted, then use either of the Assert or RaiseError functions. If you only wish to log messages while testing a macro, make sure that your calls to LogMessage are in a b_DEBUG block.