Source code for directory.errors

from typing import TYPE_CHECKING
if TYPE_CHECKING:
    from onegov.directory.models import DirectoryEntry
    from wtforms.form import _FormErrors


[docs] class OnegovDirectoryError(Exception): pass
[docs] class ValidationError(OnegovDirectoryError): def __init__( self, entry: 'DirectoryEntry', errors: '_FormErrors', *args: object ) -> None: super().__init__(*args)
[docs] self.entry = entry
[docs] self.errors = errors
[docs] class MissingColumnError(OnegovDirectoryError): def __init__(self, column: str, *args: object) -> None: super().__init__(*args)
[docs] self.column = column
[docs] class DuplicateEntryError(OnegovDirectoryError): def __init__(self, name: str, *args: object) -> None: super().__init__(*args)
[docs] self.name = name
[docs] class MissingFileError(OnegovDirectoryError): def __init__(self, name: str, *args: object) -> None: super().__init__(*args)
[docs] self.name = name