You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Timeout custom message needs to also indicate that it was a timeout event #2288
In a user keyword, if a [Timeout] is added with a custom message, then the error produced in case of failure does not include the fact that it is a timeout (as is down in the case of other keywords, such as "Should Contain".
It is true that the resulting error message isn't too clear in this case. Obviously the user could have specified a better error message, but the end result is that debugging is problematic for others. This is problem was originally encountered in this kind of situation where there was extra spaces before min:
*** Keywords ***My KW[Timeout]2 min
sleep 10s
In the above example the timeout was supposed to be 2 minutes, but in fact it was just 2 that is interpreted by Robot to be 2 seconds. To make the situation worse, the resulting error message was very confusingly just min.
The above examples make it clear that something must be done. We have two options:
Add the real timeout to the custom message as proposed in the original description.
Remove the support for specifying a custom timeout message altogether. I'm personally in favor of this solution because I don't see any good use cases for specifying a custom message and because it would simplify Robot's internal timeout implementation a bit. This would be backwards incompatible and thus should be deprecated first. Should also ask from users do they actually have valid uses cases for the message first. I supported Remove possibility to specify custom timeout message #2291 about this possibility.
changed the title [-]User keyword timeout custom message needs to also indicate that it was a timeout event[/-][+]Timeout custom message needs to also indicate that it was a timeout event[/+]on Jan 8, 2016
I will target this issue for RF 3.0.1, but hope we can instead remove custom timeout messages altogether (#2291). In that case this issue will be closed and we need a new one about deprecating custom messages.
Nobody has objected removing custom timeout messages altogether. It seems it is better to deprecate them in RF 3.0.1 instead of enhancing them. See #2291 for details.
Activity
pekkaklarck commentedon Jan 8, 2016
It is true that the resulting error message isn't too clear in this case. Obviously the user could have specified a better error message, but the end result is that debugging is problematic for others. This is problem was originally encountered in this kind of situation where there was extra spaces before
min:In the above example the timeout was supposed to be 2 minutes, but in fact it was just
2that is interpreted by Robot to be 2 seconds. To make the situation worse, the resulting error message was very confusingly justmin.pekkaklarck commentedon Jan 8, 2016
The above examples make it clear that something must be done. We have two options:
[-]User keyword timeout custom message needs to also indicate that it was a timeout event[/-][+]Timeout custom message needs to also indicate that it was a timeout event[/+]pekkaklarck commentedon Jan 8, 2016
I will target this issue for RF 3.0.1, but hope we can instead remove custom timeout messages altogether (#2291). In that case this issue will be closed and we need a new one about deprecating custom messages.
pekkaklarck commentedon Feb 24, 2016
Nobody has objected removing custom timeout messages altogether. It seems it is better to deprecate them in RF 3.0.1 instead of enhancing them. See #2291 for details.
pekkaklarck commentedon Jun 1, 2016
I submitted separate issue #2387 about deprecating custom timeout messages in RF 3.0.1. This issue can be closed.