-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Possibility to continue execution after WHILE limit is reached #4562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Being able to continue, not fail, if a WHILE loop limit is reached would sometimes be convenient. It would allow running a block of keywords a certain number of times or a certain amount of time. We already have Related to the design, the main questions are 1) what should the new control option be named, 2) what behavior it should support, and 3) what should the possible values be called. I comment all these below:
|
I totally agree with your reply ! I think that, firstly, we can focus on the To formalize this
What do you think of theses acceptance tests ? I think that the error raised in the last acceptance test can be improved. I also think that we should have an acceptance test verifying the behavior of the WHILE loop when |
Quick comments:
|
On the first point, I agree with you, there should not be a behaviour difference between I also agree with the two other points. What do you think is the next step? Maybe submitting a first PR and then iterate on it? |
I would suggest using BREAK instead of CONTINUE. This is more in line with the normal loop terminology. This is also the keyword you would use if you implement similar functionality by yourself within the loop: |
Sorry for a bit late reply. Quick comments:
|
I created two other issues for the Providing PRs still interest me ! I think I will firstly try to provide a PR for |
Thanks for the PRs! I won't have time to review them now, but I assign this issue and related #4575 and #4576 to RF 6.1 scope to make sure they aren't forgotten. I ought to have time for review next week or latest the week after. I still need to release RF 6.0.2 first so that we can start active RF 6.1 development and can merge PRs directly to master. |
Oh, there weren't new PRs yet, only new issues. My bad, I should have read the messages above more carefully. Anyway, it's awesome if you are interested to provide PRs. I consider this issue the most important one as it adds totally new functionality, but feel free to start from any WHILE loop related enhancement. You already have PR #4561 that implements #4575 so starting from that probably makes most sense. Perhaps #4576 could be next, because then all tests for this enhancement don't need to use |
This implementation allows two values, `pass`, where the execution is continued even when the limit is exceeded and `fail`, (the default) where the loop fails when the limit is exceeded. Fixes #4562
This implementation allows two values, `pass`, where the execution is continued even when the limit is exceeded and `fail`, (the default) where the loop fails when the limit is exceeded. Fixes #4562
This implementation allows two values, `pass`, where the execution is continued even when the limit is exceeded and `fail`, (the default) where the loop fails when the limit is exceeded. Fixes #4562
This implementation allows two values, `pass`, where the execution is continued even when the limit is exceeded and `fail`, (the default) where the loop fails when the limit is exceeded. Fixes #4562
This implementation allows two values, `pass`, where the execution is continued even when the limit is exceeded and `fail`, (the default) where the loop fails when the limit is exceeded. Fixes #4562
Hello everyone,
I'm creating this issue to discuss about a potential evolution of the WHILE loop behaviour when the limit is reached. As a reminder, in the current implementation of the WHILE loop, when the limit is reached, execution fails with the following message
WHILE loop was aborted because it did not finish within the limit of 5 iterations. Use the 'limit' argument to increase or remove the limit if needed.
(if the limit is 5 iterations).In this PR #4561, I suggested to add a third argument in order to be able to set a custom error message when the limit is reached. @pekkaklarck suggested to use this third argument to control what to do if the limit is reached and, for example, allow execution to continue even if the limit is reached.
I have been thinking about it and as a result, I imagined the following scenarios :
If
limit_reached_behavior
equalsCONTINUE
, the execution simply continues if the limit is reached.If
limit_reached_behavior
doesn't equalCONTINUE
, the keyword given inlimit_reached_behavior
is executed.What do you think of such scenarios ? Feel free to suggest other scenarios !
I am not very comfortable with the idea of using
CONTINUE
to continue execution if the limit is reached because the stringCONTINUE
is already used to stop executing the current loop iteration and continues to the next one.It would also be very interesting to discuss what the option name should be.
Such scenarios also beg the following question : Where and How should we display the keyword executed after reaching the limit in
log.html
?Thank you very much for taking the time to read this issue !
The text was updated successfully, but these errors were encountered: