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
Currently we can set context.on_cleanup_error to suppress certain exceptions from being printed to the console. However, even if we do this, behave will re-raise the exception, and ultimately cause the scenario/feature/run to be marked as a failure. We can disable this behavior via Context.FAIL_ON_CLEANUP_ERRORS and/or context.fail_on_cleanup_errors = False but this is a very broad switch. We can also do try/except ourselves but that kind of defeats the point of on_cleanup_error.
Instead, it would be nice if on_cleanup_error could return a boolean indicating that the exception in question can be ignored. For backwards compatibility, if it returns None then the exception is not dropped.
The text was updated successfully, but these errors were encountered:
Currently we can set
context.on_cleanup_error
to suppress certain exceptions from being printed to the console. However, even if we do this, behave will re-raise the exception, and ultimately cause the scenario/feature/run to be marked as a failure. We can disable this behavior viaContext.FAIL_ON_CLEANUP_ERRORS
and/orcontext.fail_on_cleanup_errors = False
but this is a very broad switch. We can also dotry
/except
ourselves but that kind of defeats the point ofon_cleanup_error
.Instead, it would be nice if
on_cleanup_error
could return a boolean indicating that the exception in question can be ignored. For backwards compatibility, if it returnsNone
then the exception is not dropped.The text was updated successfully, but these errors were encountered: