File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -1040,7 +1040,12 @@ they also mostly work the same way. A difference is that Python uses lower case
1040
1040
upper case letters. A bigger difference is that with Python exceptions are objects
1041
1041
and with Robot Framework you are dealing with error messages as strings.
1042
1042
1043
+ .. note :: It is not possible to catch errors caused by invalid syntax or errors
1044
+ that `stop the whole execution `__.
1045
+
1046
+
1043
1047
__ https://docs.python.org/tutorial/errors.html#handling-exceptions
1048
+ __ `Stopping test execution gracefully `_
1044
1049
1045
1050
Catching exceptions with `EXCEPT `
1046
1051
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1117,8 +1122,6 @@ other `EXCEPT` branches:
1117
1122
Error Handler 2
1118
1123
END
1119
1124
1120
- .. note :: It is not possible to catch exceptions caused by invalid syntax.
1121
-
1122
1125
Matching errors using patterns
1123
1126
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1124
1127
Original file line number Diff line number Diff line change @@ -268,10 +268,16 @@ log levels are:
268
268
`FAIL `
269
269
Used when a keyword fails. Can be used only by Robot Framework itself.
270
270
271
+ `ERROR `
272
+ Used for displaying errors. Errors are shown in `the console and in
273
+ the Test Execution Errors section in log files `__, but they
274
+ do not affect test case statuses. If the `--exitonerror option is enabled `__,
275
+ errors stop the whole execution, though,
276
+
271
277
`WARN `
272
- Used to display warnings. They shown also in `the console and in
278
+ Used for displaying warnings. Warnings are shown in `the console and in
273
279
the Test Execution Errors section in log files `__, but they
274
- do not affect the test case status .
280
+ do not affect test case statuses .
275
281
276
282
`INFO `
277
283
The default level for normal messages. By default,
@@ -289,6 +295,8 @@ log levels are:
289
295
290
296
__ `Logging information `_
291
297
__ `Errors and warnings during execution `_
298
+ __ `Stopping on parsing or execution error `_
299
+ __ `Errors and warnings during execution `_
292
300
293
301
Setting log level
294
302
~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -692,10 +692,9 @@ fatal and execution stopped so that remaining tests are marked failed. With
692
692
parsing errors encountered before execution even starts, this means that no
693
693
tests are actually run.
694
694
695
- When this option is enabled, using `ERROR ` level in logs, such as `Log ` keyword
696
- from BuiltIn or Python's standard logging module, will also fail the execution.
697
- Additionally, the TRY/EXCEPT stucture does not catch log messages with `ERROR `
698
- level, even when :option: `--exitonerror ` is used.
695
+ .. note :: Also logging something with the `ERROR` `log level`_ is considered
696
+ an error and stops the execution if the :option: `--exitonerror ` option
697
+ is used.
699
698
700
699
__ `Errors and warnings during execution `_
701
700
You can’t perform that action at this time.
0 commit comments