-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
35 lines (26 loc) · 1.06 KB
/
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 AokanaException(Exception):
def __init__(self, message):
self.message = message
def getMessage(self):
return self.message
class SyncArgumentsException(AokanaException):
pass
class EntriesException(SyncArgumentsException):
pass
class InvalidEntriesException(EntriesException):
def __init__(self, file):
super().__init__('Invalid entries file (%s)' % file)
class EntriesParseException(EntriesException):
def __init__(self, file):
super().__init__('Error parsing entries file (%s)' % file)
class ConfigException(SyncArgumentsException):
pass
class MissingConfigException(ConfigException):
def __init__(self):
super().__init__('One or more configuration parameters are missing.')
class InexistentAudioDirectoryException(ConfigException):
def __init__(self, directory):
super().__init__('Inexistent audio directory: %s' % directory)
class InexistentEntriesFileException(ConfigException):
def __init__(self, file):
super().__init__('Inexistent entries file: %s' % file)