forked from diffpy/diffpy.pdfgui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrolerrors.py
More file actions
96 lines (59 loc) · 2.02 KB
/
controlerrors.py
File metadata and controls
96 lines (59 loc) · 2.02 KB
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
#!/usr/bin/env python
##############################################################################
#
# PDFgui by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2006 trustees of the Michigan State University.
# All rights reserved.
#
# File coded by: Jiwu Liu
#
# See AUTHORS.txt for a list of people who contributed.
# See LICENSE.txt for license information.
#
##############################################################################
class ControlError(Exception):
"""Basic PDFGuiControl exception class."""
def __init__(self, info):
"""initialize.
info -- description string
"""
Exception.__init__(self)
self.info = info
def __str__(self):
return self.info
class ControlConfigError(ControlError):
"""PDFGuiControl exception class -- object config is invalid."""
pass
class ControlFileError(ControlError):
"""PDFGuiControl exception class -- object config is invalid."""
pass
class ControlKeyError(ControlError):
"""PDFGuiControl exception class -- requested object can't be
found."""
pass
class ControlValueError(ControlError):
"""PDFGuiControl exception class -- Invalid value."""
pass
class ControlTypeError(ControlError):
"""PDFGuiControl exception class -- Type mismatch."""
pass
class ControlStatusError(ControlError):
"""PDFGuiControl exception class -- Fitting status doesn't match."""
pass
class ControlRuntimeError(ControlError):
"""PDFGuiControl exception class -- various irrecoverable runtime
error."""
pass
class ControlIndexError(ControlError):
"""PDFGuiControl exception class -- index out of bound."""
pass
class ControlSyntaxError(ControlError):
"""PDFGuiControl exception class -- invalid syntax of constraint
formula."""
pass
class TempControlSelectError(ControlError):
"""Temporary define this error to identify the select-control error
in python3."""
pass
# End of file