Use the ON ERROR command to execute a command after an error occurs.
Options
AFTER
Indicates the command file should be run after the ERROR. The use of the AFTER keyword can be omitted for backwards compatibility, but should be used in current releases.
RUN cmdfile
Specifies the name of the command file to execute.
RESET
Turns ON AFTER ERROR processing off.
About the ON ERROR Command
The default is ON AFTER ERROR RESET.
Any command that can be used in an entry/exit procedure, or EEP, can be used with ON AFTER ERROR except: form specific commands such as NEXTROW, DUPROW, SKIP, etc. If a command cannot be used in an EEP, such as RBDEFINE, RESTORE, RBAPP, and RBSYNC, then it cannot be used with ON AFTER ERROR.
The command file content must be limited to 2000 characters. To review the character count for a file within R:BASE Editor, choose "File" > "Information" from the main menu bar.
Since this command remains in effect until it is re-issued, you should place ON AFTER ERROR RESET at the end of command files that use it. If ON AFTER ERROR runs a command file, the file must end with a RETURN command.
Example:
ON AFTER ERROR RUN ErrorLog.rmd