forked from openstate/open-raadsinformatie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
35 lines (22 loc) · 996 Bytes
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class ConfigurationError(Exception):
"""Thrown when a setting in sources.json is missing or has
an improper value."""
class NotFound(Exception):
"""Indicates that a requested item does not exist."""
class UnableToGenerateObjectId(Exception):
"""Indicates that the 'object_id' can't be generated."""
class NoDeserializerAvailable(Exception):
"""Thrown when there is no deserializer available for the
content-type of an."""
class FieldNotAvailable(Exception):
"""Exception thrown when a field could not be found."""
def __init__(self, field):
self.field = field
def __str__(self):
return repr(self.field)
class SkipEnrichment(Exception):
"""Exception thrown from within an enrichment task to indicate that
there is a valid reason for skipping the enrichemnt."""
class UnsupportedContentType(Exception):
"""Exception thrown when a media enrichemnt task is asked to process
media content that is doesn't understand."""