comicbox.exceptions

source module comicbox.exceptions

Exceptions for comicbox.

Every operational error comicbox raises on a public path derives from :class:ComicboxError, so library consumers can write except ComicboxError without also swallowing unrelated programming errors (ValueError, KeyError, …) from their own code.

This module is a leaf: it must not import anything from comicbox, so any module (including the format packages and the box mixins) can import it without load-order concerns. The write/online modules re-export their exceptions from here under their historical import paths.

Classes

source class ComicboxError()

Bases : Exception

Base class for all operational errors comicbox raises.

source class UnsupportedArchiveTypeError()

Bases : ComicboxError

Unsupported Archive Type.

source class ArchiveError()

Bases : ComicboxError

An archive could not be opened or read.

source class ArchiveWriteError()

Bases : ArchiveError

An archive could not be written, repacked, or renamed.

source class DestinationOccupiedError(source: Path, destination: Path, kind: DestinationKind, occupant: Path | None = None)

Bases : ArchiveWriteError

A write’s destination path is held by another file or writer.

kind says which collision: "convert" – the CBZ this archive would repack to already exists (or another archive in the same batch claims it, in which case occupant names it); "rename" – the predicted filename is taken; "inflight" – another writer in this process holds the destination right now (transient; retry later).

Record the two paths, the collision kind, and any rival source.

source class ConfigurationError()

Bases : ComicboxError, ValueError

A config file, env var, or argument holds a value comicbox rejects.

Also a ValueError, which is what these sites raised before this class existed, so callers catching that keep working.

source class MetadataError()

Bases : ComicboxError

Metadata could not be loaded or routed through the source pipeline.

source class ExportError()

Bases : ComicboxError

A metadata file export failed its preconditions.

source class WriteValidationError()

Bases : ComicboxError

Raised when write_metadata inputs are inconsistent or invalid.

source class OnlineConfigurationError()

Bases : ComicboxError

Raised when OnlineSession inputs are inconsistent or incomplete.

source class OnlineLookupAbortedError()

Bases : ComicboxError

Raised when the selector callback returns (‘abort’, None).