Exceptions API
pathapi.exceptions
The exceptions pathapi defines.
A failure of the file system or of a backend is the OSError type that
pathlib raises for the same condition (FileNotFoundError,
PermissionError, ...); this module holds what has no such type. A bad
argument is a plain ValueError or TypeError.
__all__ = ['NonRelativePatternError', 'PathError']
module-attribute
NonRelativePatternError
Bases: PathError, NotImplementedError, ValueError
An absolute or anchored glob pattern. pathlib raises
NotImplementedError("Non-relative patterns are unsupported"); this is
also a ValueError, so either except clause catches it.
PathError
Bases: Exception
Base class of the exceptions pathapi defines for a failure at
run time that no builtin describes.