-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexceptions.py
45 lines (32 loc) · 1.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
class RequiredException(Exception):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class BlacklistedException(Exception):
def __init__(self, fieldName, fieldValue, job_id):
self.value = fieldValue
self.name = fieldName
self.job_id = job_id
super().__init__(fieldName + " Blacklisted: "+fieldValue)
def __str__(self):
return self.name + " Blacklisted: " + self.value
class ApplyException(Exception):
def __init__(self, job_id, message):
self.job_id = job_id
self.msg = message
self.questions = []
super().__init__(message)
def __str__(self):
return self.msg
def addQuestion(self, question):
if question not in self.questions:
self.questions.append(question)
def getQuestions(self):
return self.questions
class FinishException(Exception):
def __init__(self, msg):
self.msg = msg
super().__init__(msg)
def __str__(self):
return self.msg