Exceptions

Package wide exceptions

drain_swamp.exceptions.__all__: tuple[str, str] = ("PyProjectTOMLParseError", "PyProjectTOMLReadError")

Module exports

exception drain_swamp.exceptions.PyProjectTOMLParseError(msg: str)

Bases: ValueError

No point in continuing if the pyproject.toml can’t be parsed and loaded.

Variables:

msg (str) – The error message

exception drain_swamp.exceptions.PyProjectTOMLReadError(msg: str)

Bases: OSError

pyproject.toml Issue, not a file or insufficient permissions.

Although an OSError, it’s generic. The cause of the error is not passed forward (aka allowed to be lost)

Variables:

msg (str) – The error message