Source code for core.errors

from __future__ import annotations

from typing import TYPE_CHECKING
if TYPE_CHECKING:
    from collections.abc import Mapping, Sequence


[docs] class CSVError(Exception): pass
[docs] class MissingColumnsError(CSVError): def __init__(self, columns: Sequence[str]):
[docs] self.columns = columns
[docs] class AmbiguousColumnsError(CSVError): def __init__(self, columns: Mapping[str, Sequence[str]]):
[docs] self.columns = columns
[docs] class DuplicateColumnNamesError(CSVError): pass
[docs] class InvalidFormatError(CSVError): pass
[docs] class EmptyFileError(CSVError): pass
[docs] class EmptyLineInFileError(CSVError): pass
[docs] class AlreadyLockedError(Exception): """ Raised if :func:`onegov.core.utils.lock` fails to acquire a lock. """