PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
HOOK_UNKNOWN_MACRO |
This configuration macro allows you to intercept the error handling when a macro was not found. If the hook does not exist then PPWIZARD will simply abort displaying the usual error message.
The hook allow you to either supply a value for the non-existent variable or alter the error message. The hook should not perform any macro substitution.
This variable defines the name of a macro which contains the rexx code to be executed, this code should be "pre-expanded" (not contain any references to macros).
The rexx code gets passed these variables:
Example |
;--- Define hook ------------------------------------------------------------ #DefineRexx 'HOOK_UNKNOWN_MACRO' ;--- Handle specifc variables ------------------------------------------- if translate(HookDefineName) = 'SOMEMACROWHICHWEWILLCONTINUEON' then do ;--- We will supply the value for this macro ------------------------ HookDefineValue = "{{This macro does not exist}}"; HookDefineContinue = 'Y' end; ;--- Finished all known substitutions ----------------------------------- if HookDefineContinue = 'N' then ;;Did we substitute a value? do ;--- Update the error message we will display ----------------------- HookDefineValue = HookDefineValue || '0A0A'x || 'Perhaps this is an obsolete WISEINST variable?' end; #DefineRexx ;--- Test Hook -------------------------------------------------------------- C. <$SomeMacroWhichWeWillContinueOn $$UPPER> D. <$XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>