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

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