<< Click to Display Table of Contents >> Navigation: 2. Components > 4. Special features > 4.2 :on_Error - Label |
MiniRobotLanguage (MRL)
:on_Error Label
on Error goto
Intention
:on_Error is a special Label. Its not a Label like any other!
If :on_Error is there, the script will jump there after an error and continue script execution there.
:on_Error does NOT prevent error messages, For this you have to use the USM.-command.
If :on_Error is really called, will also depend on the settings of an USM. - command.
Assume an error occurs and there is such a Label in a script. Then the robot will continue script execution in that line that is below that label.
The ":on_Error" Label does not prevent the Error-Message to be displayed, use the USM.10 command for that.
See more details and examples on error-handling here: 1.B Error handling .
Syntax
:on_Error
Parameter Explanation
-
Example
'***********************************************
' USM. - Samples
'***********************************************
'Switch on silent Mode
USM.10
' Switch on Silent Mode with Error-Log file
USM.10|?pfad\MyLog.txt
' Clear ":on_Error" Retry Flag
USM.64
' Switch off Silent Mode
USM.0
END.
:on_Error
MBX. There was an Error
END.
'***********************************************
Remarks
Limitations:
-
See also: