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
Support reporting multiple failures with one exception #4277
A problem with the above is that it would fail for the first failure and possible other failures wouldn't be reported. This problem is relatively easy to avoid by collecting errors and reporting them in one go:
Report each failure in the list as a separate FAIL message in the log file.
Construct the final failure message from individual failures automatically.
This would be a simple syntax addition and the feature would be easy to use. The main open design decision I see is that we needed to design should we support this with all exceptions or only with some. Supporting it with all sounds a bit risky for me and I believe we should limit it somehow. If we limit, we could make it so that we only do this with AssertionError and possibly also with RuntimeError. Alternatively we could only support this with out custom exceptions like robot.api.Failure (#3685), but I believe that's too limiting.
Issue #4276 proposes similar functionality with a different API. It has a benefit that each failure would get a timestamp that would match the time the failure actually was detected. If that's considered an important feature, I'm sure we could support it also with the approach proposed here.
Activity
pekkaklarck commentedon Mar 15, 2022
Issue #4276 proposes similar functionality with a different API. It has a benefit that each failure would get a timestamp that would match the time the failure actually was detected. If that's considered an important feature, I'm sure we could support it also with the approach proposed here.
KotlinIsland commentedon Mar 15, 2022
pep-654 is highly relevant here.