|
a |
|
b/pathaia/patches/errors.py |
|
|
1 |
# coding: utf8 |
|
|
2 |
""" |
|
|
3 |
A module to handle patchification errors. |
|
|
4 |
|
|
|
5 |
Enable catching of level and filter accesses. |
|
|
6 |
""" |
|
|
7 |
|
|
|
8 |
|
|
|
9 |
class Error(Exception): |
|
|
10 |
""" |
|
|
11 |
Base of custom errors. |
|
|
12 |
|
|
|
13 |
********************** |
|
|
14 |
""" |
|
|
15 |
|
|
|
16 |
pass |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
class UnknownLevelError(Error): |
|
|
20 |
""" |
|
|
21 |
Raise when trying to access unknown level. |
|
|
22 |
|
|
|
23 |
********************************************* |
|
|
24 |
""" |
|
|
25 |
|
|
|
26 |
pass |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
class UnknownFilterError(Error): |
|
|
30 |
""" |
|
|
31 |
Raise when trying to use an unknown filter. |
|
|
32 |
|
|
|
33 |
********************************************* |
|
|
34 |
""" |
|
|
35 |
|
|
|
36 |
pass |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
class PathaiaWarning(Warning): |
|
|
40 |
""" |
|
|
41 |
Base of custom warnings. |
|
|
42 |
|
|
|
43 |
************************ |
|
|
44 |
""" |
|
|
45 |
pass |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
class HasNoDataFolder(PathaiaWarning): |
|
|
49 |
""" |
|
|
50 |
Raise when trying to read mrxs with no data folder. |
|
|
51 |
|
|
|
52 |
*************************************************** |
|
|
53 |
""" |
|
|
54 |
|
|
|
55 |
pass |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
class InvalidArgument(Error): |
|
|
59 |
""" |
|
|
60 |
Raise when trying to read mrxs with no data folder. |
|
|
61 |
|
|
|
62 |
*************************************************** |
|
|
63 |
""" |
|
|
64 |
|
|
|
65 |
pass |