Package diffpy :: Package pdfgui :: Package control :: Module controlerrors
[hide private]
[frames] | no frames]

Source Code for Module diffpy.pdfgui.control.controlerrors

  1  #!/usr/bin/env python 
  2  ############################################################################## 
  3  # 
  4  # PDFgui            by DANSE Diffraction group 
  5  #                   Simon J. L. Billinge 
  6  #                   (c) 2006 trustees of the Michigan State University. 
  7  #                   All rights reserved. 
  8  # 
  9  # File coded by:    Jiwu Liu 
 10  # 
 11  # See AUTHORS.txt for a list of people who contributed. 
 12  # See LICENSE.txt for license information. 
 13  # 
 14  ############################################################################## 
 15   
16 -class ControlError(Exception):
17 """Basic PDFGuiControl exception class"""
18 - def __init__(self, info):
19 """initialize 20 21 info -- description string 22 """ 23 Exception.__init__(self) 24 self.info = info
25
26 - def __str__(self):
27 return self.info
28
29 -class ControlConfigError(ControlError):
30 """PDFGuiControl exception class -- object config is invalid"""
31 - def __init__(self, info):
32 """initialize 33 34 info -- description string 35 """ 36 ControlError.__init__(self, info)
37
38 -class ControlFileError(ControlError):
39 """PDFGuiControl exception class -- object config is invalid"""
40 - def __init__(self, info):
41 """initialize 42 43 info -- description string 44 """ 45 ControlError.__init__(self, info)
46
47 -class ControlKeyError(ControlError):
48 """PDFGuiControl exception class -- requested object can't be found"""
49 - def __init__(self, info):
50 """initialize 51 52 info -- description string 53 """ 54 ControlError.__init__(self, info)
55
56 -class ControlValueError(ControlError):
57 """PDFGuiControl exception class -- Invalid value"""
58 - def __init__(self, info):
59 """initialize 60 61 info -- description string 62 """ 63 ControlError.__init__(self, info)
64
65 -class ControlTypeError(ControlError):
66 """PDFGuiControl exception class -- Type mismatch"""
67 - def __init__(self, info):
68 """initialize 69 70 info -- description string 71 """ 72 ControlError.__init__(self, info)
73
74 -class ControlStatusError(ControlError):
75 """PDFGuiControl exception class -- Fitting status doesn't match"""
76 - def __init__(self, info):
77 """initialize 78 79 info -- description string 80 """ 81 ControlError.__init__(self, info)
82
83 -class ControlRuntimeError(ControlError):
84 """PDFGuiControl exception class -- various irrecoverable runtime error"""
85 - def __init__(self, info):
86 """initialize 87 88 info -- description string 89 """ 90 ControlError.__init__(self, info)
91
92 -class ControlConnectError(ControlError):
93 """PDFGuiControl exception class -- network connection error"""
94 - def __init__(self, info):
95 """initialize 96 97 info -- description string 98 """ 99 ControlError.__init__(self, info)
100
101 -class ControlAuthError(ControlError):
102 """PDFGuiControl exception class -- authentication failed """
103 - def __init__(self, info):
104 """initialize 105 106 info -- description string 107 """ 108 ControlError.__init__(self, info)
109
110 -class ControlIndexError(ControlError):
111 """PDFGuiControl exception class -- index out of bound """
112 - def __init__(self, info):
113 """initialize 114 115 info -- description string 116 """ 117 ControlError.__init__(self, info)
118
119 -class ControlSyntaxError(ControlError):
120 """PDFGuiControl exception class -- invalid syntax of constraint formula 121 """
122 - def __init__(self, info):
123 """initialize 124 125 info -- description string 126 """ 127 ControlError.__init__(self, info)
128 129 # version 130 __id__ = "$Id: controlerrors.py 2980 2009-04-02 00:14:33Z juhas $" 131 132 # End of file 133