robot.api.exceptions
¶
Exceptions that libraries can use for communicating failures and other events.
These exceptions can be imported also via the top level :mod:robot.api package like
from robot.api import SkipExecution.
This module and all exceptions are new in Robot Framework 4.0.
Failure
¶
Bases: AssertionError
Report failed validation.
There is no practical difference in using this exception compared to using
the standard AssertionError. The main benefits are HTML support and that
the name of this exception is consistent with other exceptions in this module.
:param message: Exception message.
:param html: When True, message is considered to be HTML and not escaped.
Source code in src/robot/api/exceptions.py
ContinuableFailure
¶
Bases: Failure
Report failed validation but allow continuing execution.
:param message: Exception message.
:param html: When True, message is considered to be HTML and not escaped.
Source code in src/robot/api/exceptions.py
Error
¶
Bases: RuntimeError
Report error in execution.
Failures related to the system not behaving as expected should typically be
reported using the :class:Failure exception or the standard AssertionError.
This exception can be used, for example, if the keyword is used incorrectly.
There is no practical difference in using this exception compared to using
the standard RuntimeError. The main benefits are HTML support and that
the name of this exception is consistent with other exceptions in this module.
:param message: Exception message.
:param html: When True, message is considered to be HTML and not escaped.
Source code in src/robot/api/exceptions.py
FatalError
¶
Bases: Error
Report error that stops the whole execution.
:param message: Exception message.
:param html: When True, message is considered to be HTML and not escaped.