Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
this PR is one possible solution for issue 42.
The standard procedure for running on failure in other libraries is to have your library class, in our case Mainframe3270, inherit from DynamicCore.
By overwriting DynamicCore's run_keyword function, we can take control of keyword execution by surrounding BuiltIn's run_keyword function in a
try -> catch
routineAs you can see, in the exception part, we run our own defined routine and then raise the final error.
Working with DynamicCore has one downside, which is that the main library has to have this structure:
Also, library keywords must be annotated with
@keyword
,see
This explains why I moved the description, as well as import arguments into
__init__.py
.I understand that this is quite the change to the project structure. However, I also feel this a very useful feature supported out of the box by most popular GUI automation frameworks.
You can check the feature by running the new test cases under
tests/run_on_failure/