Source code for wsinfer.errors
"""Exceptions used in WSInfer."""
from __future__ import annotations
[docs]
class WsinferException(Exception):
"""Base class for wsinfer exceptions."""
[docs]
class UnknownArchitectureError(WsinferException):
"""Architecture is unknown and cannot be found."""
[docs]
class WholeSlideImageDirectoryNotFound(WsinferException, FileNotFoundError):
...
[docs]
class DuplicateFilePrefixesFound(WsinferException):
"""A duplicate file prefix has been found.
An example of duplicate file prefixes is files a.svs and a.tif. WSInfer relies on
the stems as a unique ID, so we cannot allow duplicate stems.
"""
[docs]
class WholeSlideImagesNotFound(WsinferException, FileNotFoundError):
...
[docs]
class ResultsDirectoryNotFound(WsinferException, FileNotFoundError):
...
[docs]
class PatchDirectoryNotFound(WsinferException, FileNotFoundError):
...
[docs]
class CannotReadSpacing(WsinferException):
...
[docs]
class NoBackendException(WsinferException):
...
[docs]
class BackendNotAvailable(WsinferException):
"""The requested backend is not available."""