-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathexceptions.py
97 lines (59 loc) · 2.04 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
class BciPyCoreException(Exception):
"""BciPy Core Exception.
Thrown when an error occurs specific to BciPy core concepts.
"""
def __init__(self, message, errors=None):
super().__init__(message)
self.message = message
self.errors = errors
class SignalException(BciPyCoreException):
"""
Signal Exception.
Thrown when signal module encounters an error.
"""
def __init__(self, message, errors=None):
super().__init__(message)
self.errors = errors
class FieldException(BciPyCoreException):
"""Field Exception.
Thrown when there is an exception relating to experimental fields.
"""
...
class ExperimentException(BciPyCoreException):
"""Experiment Exception.
Thrown when there is an exception relating to experiments.
"""
...
class UnregisteredExperimentException(ExperimentException):
"""Unregistered Experiment.
Thrown when experiment is not registered in the provided experiment path.
"""
...
class UnregisteredFieldException(FieldException):
"""Unregistered Field.
Thrown when field is not registered in the provided field path.
"""
...
class InvalidExperimentException(ExperimentException):
"""Invalid Experiment Exception.
Thrown when providing experiment data in the incorrect format.
"""
...
class InvalidFieldException(FieldException):
"""Invalid Field Exception.
Thrown when providing field data in the incorrect format.
"""
...
class UnsupportedResponseType(BciPyCoreException):
"""Unsupported ResponseType
Thrown when attempting to set the response type of a language model to an
unsupported value."""
...
class TaskConfigurationException(BciPyCoreException):
"""Task Configuration Exception.
Thrown when attempting to run a task with invalid configurations"""
...
class KenLMInstallationException(BciPyCoreException):
"""KenLM Installation Exception.
Thrown when attempting to import kenlm without installing the module"""
...