Skip to content

Try to avoid exposing third-party exceptions #76

Description

@clbarnes

Instead, wrap them in a transformnd exception.

class TransformndException(Exception):
    ...

class TransformndNoPath(TransformndException):
    ...


try:
    seq = graph.get_sequence(B, A)
except networkx.exception.NetworkXNoPath as e:
    raise TransformndNoPath(f"no path between {B} and {A}") from e

Raised by @Tomaz-Vieira here #74

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions