Skip to content

Exceptions

exceptions

Base exception types for LinkingTK.

LinkingTKError

Bases: Exception

Base class for all exceptions raised by LinkingTK.

OptionalDependencyError

OptionalDependencyError(feature: str, extra: str)

Bases: LinkingTKError

Raised when an optional feature is used without its dependency installed.

Source code in src/linkingtk/exceptions.py
13
14
15
16
17
def __init__(self, feature: str, extra: str) -> None:
    super().__init__(
        f"'{feature}' requires an optional dependency. "
        f"Install it via 'pip install linkingtk[{extra}]'."
    )