|
Keyword |
<#DoIfErr> |
|
Parameters |
Name of a PenCommand to execute. |
|
Action |
Save name of a PenCommand as the error handler name. |
|
Remarks |
This command sets the PenCommand name as an error handler. If the subsequent instructions in the current PenCommand definition return an error code (e.g. <#LoadLib> could not load user library), than the error handler PenCommand will be executed (if defined). This setting is good only for the PenCommands currently being executed and has no effect upon the nesting ones. |
Example:
// Set error handler PenCommand name to "%loaderr"
<#DoIfErr>%loaderr
// Load library0 "mylib.dll"
<#LoadLib>mylib.dll
// Set error handler PenCommands name to "%callerr"
<#DoIfErr>%caller
// Call user defined procedure "MyFunc" from library0
<#CallLib>myfunc
// Turn of error handling (no handling defined)
<#DoIfErr>
// Free Library0
<#FreeLib>
See Also