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
When raising PruneSearch in the finish_vertex traversal event, the traversal methods raise PanicError.
I suggest raising RuntimeError instead. This properly inherits from Exception (and not only from BaseException) and has a specific type a user can try: ...; except RunimeError: ....
Panic also has a side effect of printing to stderr a panic message (other than the python-raised exception traceback).
I think this stderr message should be avoided if possible, but I'm not sure there is an easy solution for this (other than the breaking change of rustworkx-core not panicking).
This was raised in issue #1361, which was closed in PR #1375.
I guess this point got drowned in the documentation change discussions, so I'm opening a new issue for it here.
(The raised exception in the finish event was added to the rustworkx docs in that PR with the exception type unmentioned).
If there is already a PR for this, or this enhancement is unwanted feel free to close this issue.
The text was updated successfully, but these errors were encountered:
When raising
PruneSearch
in thefinish_vertex
traversal event, the traversal methods raisePanicError
.I suggest raising
RuntimeError
instead. This properly inherits fromException
(and not only fromBaseException
) and has a specific type a user cantry: ...; except RunimeError: ...
.Panic also has a side effect of printing to stderr a panic message (other than the python-raised exception traceback).
I think this stderr message should be avoided if possible, but I'm not sure there is an easy solution for this (other than the breaking change of
rustworkx-core
not panicking).This was raised in issue #1361, which was closed in PR #1375.
I guess this point got drowned in the documentation change discussions, so I'm opening a new issue for it here.
(The raised exception in the finish event was added to the
rustworkx
docs in that PR with the exception type unmentioned).If there is already a PR for this, or this enhancement is unwanted feel free to close this issue.
The text was updated successfully, but these errors were encountered: