In many RPA software, each Action has an exception handling setting, please see the image below
There is an err function in QM, but I am very much looking forward to enhancing its functionality and naming it as the new function err2.
The description of the function is as follows:
When the error occurs, the code of the line where the error occurred will be Repeat execution, retrying N times, the interval is M seconds, there are three cases:
Case 1: If the retry is successful, continue to execute downwards. Example code: err2(5 10)
Case 2: If the retry fails, an error message is displayed, and the following part of the error message shows the line number of the code in which the error occurred (for later searching in the source code)
Case 3: If the retry fails, execute the function Fun1, then there are two cases:
A. Continue to execute downwards, sample code: err2(5 10 Fun1 0)
If the retry fails, the error message is displayed, and the error message is the last The line number of the code in which the error occurred
B. Code to re-execute the line of the error, sample code: err2(5 10 Fun1 1)
Enhanced exception handling is very important, it uses the process to run more stable
The format of the function definition: err2(m n Fun flat)
Macro err2 Exception handling test
There is an err function in QM, but I am very much looking forward to enhancing its functionality and naming it as the new function err2.
The description of the function is as follows:
When the error occurs, the code of the line where the error occurred will be Repeat execution, retrying N times, the interval is M seconds, there are three cases:
Case 1: If the retry is successful, continue to execute downwards. Example code: err2(5 10)
Case 2: If the retry fails, an error message is displayed, and the following part of the error message shows the line number of the code in which the error occurred (for later searching in the source code)
Case 3: If the retry fails, execute the function Fun1, then there are two cases:
A. Continue to execute downwards, sample code: err2(5 10 Fun1 0)
If the retry fails, the error message is displayed, and the error message is the last The line number of the code in which the error occurred
B. Code to re-execute the line of the error, sample code: err2(5 10 Fun1 1)
Enhanced exception handling is very important, it uses the process to run more stable
The format of the function definition: err2(m n Fun flat)
Macro err2 Exception handling test
MES m.timeout=5; m.style="OCa"; m.default='C'
mes("text" "title" m)
run "$desktop$\test.txt"
err2(5 10)
;err2(5 10 Fun1 1) ;;1 Re-execute the line of code where the error occurred, after executing Fun1
;err2(5 10 Fun1 0) ;;0 After executing Fun1, continue to execute code down
;err2(0 0 Fun1 0) ;;Do not retry, only execute the function Fun1, and then continue to execute downward