Generating Errors and Messages

Navigation:  Appendices > Macro Language > Instructions >

Generating Errors and Messages

Previous pageReturn to chapter overviewNext page

Sometimes, you may want to generate your own messages and/or errors in response to specific conditions that can only be evaluated at run-time. The macro functions that allow you to write instructions to generate your own messages or errors are :

 

Assert

Generates an error if a given condition is not true. This is useful at places in macro code where you might think "if we are here then this condition must be true". Assertions ensure that this is verified or that an error is generated. The error can cause the current macro to abort and generate a message similar to a token error, or it can cause the entire diary generation to abort.

LogMessage

Generates a run-time message but does not affect the execution of the macro otherwise. This is useful for testing.

RaiseError

Generates an error. The error can cause the current macro to abort and generate a message similar to a token error, or it can cause the entire diary generation to abort.

 

 

For more details on these functions, click on their respective links.


Topic 174300 updated on 09-Jan-2003.
Topic URL: http://www.qppstudio.net/webhelp/index.html?generatingerrorsandmessages.htm