-
Notifications
You must be signed in to change notification settings - Fork 4
/
error.py
executable file
·41 lines (29 loc) · 1.02 KB
/
error.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
from reader.error import ReaderError
class MerError(Exception):
def __init__(self, error_message=None):
self.error_message = error_message
def __str__(self):
if self.error_message:
return self.error_message
return "Material Entity Recognition Error"
class MofError(Exception):
def __init__(self, error_message=None):
self.error_message = error_message
def __str__(self):
if self.error_message:
return self.error_message
return "MOF Error"
class DatabaseError(Exception):
def __init__(self, error_message=None):
self.error_message = error_message
def __str__(self):
if self.error_message:
return self.error_message
return "Database Error"
class MerWarning(Warning):
def __init__(self, error_message=None):
self.error_message = error_message
def __str__(self):
if self.error_message:
return self.error_message
return "Material Entity Recognition Warning"