Package diffpy :: Package srrietveld :: Module exceptions
[frames] | no frames]

Source Code for Module diffpy.srrietveld.exceptions

 1  ############################################################################## 
 2  # 
 3  # diffpy.srrietveld by DANSE Diffraction group 
 4  #                   Simon J. L. Billinge 
 5  #                   (c) 2010 Trustees of the Columbia University 
 6  #                   in the City of New York.  All rights reserved. 
 7  # 
 8  # File coded by:    Jiwu Liu 
 9  # 
10  # See AUTHORS.txt for a list of people who contributed. 
11  # See LICENSE.txt for license information. 
12  # 
13  ############################################################################## 
14   
15 -class SrrError(Exception):
16 """Basic SrRietveld exception class."""
17 - def __init__(self, info, errType):
18 """initialize 19 20 info -- description string 21 """ 22 Exception.__init__(self) 23 self.info = info 24 self.type = errType 25 return
26
27 - def __str__(self):
28 return self.info
29
30 -class SrrConfigError(SrrError):
31 """ SrRietveld config exception."""
32 - def __init__(self, info):
33 """initialize 34 35 info -- description string 36 """ 37 38 SrrError.__init__(self, info, self.__class__.__name__) 39 return
40 -class SrrFileError(SrrError):
41 '''SrRietveld file exception'''
42 - def __init__(self, info):
43 """initialize 44 45 info -- description string 46 """ 47 SrrError.__init__(self, info, self.__class__.__name__) 48 return
49 -class SrrIOError(SrrError):
50 '''SrRietveld input / output exception'''
51 - def __init__(self, info):
52 """initialize 53 54 info -- description string 55 """ 56 SrrError.__init__(self, info, self.__class__.__name__) 57 return
58
59 -class SrrRunTimeError(SrrError):
60 '''SrRietveld run time exception'''
61 - def __init__(self, info):
62 """initialize 63 64 info -- description string 65 """ 66 SrrError.__init__(self, info, self.__class__.__name__) 67 return
68 -class SrrValueError(SrrError):
69 '''SrRietveld value exception'''
70 - def __init__(self, info):
71 """initialize 72 73 info -- description string 74 """ 75 SrrError.__init__(self, info, self.__class__.__name__) 76 return
77 -class SrrInputError(SrrError):
78 '''SrRietveld exception by user input'''
79 - def __init__(self, info):
80 """initialize 81 82 info -- description string 83 """ 84 SrrError.__init__(self, info, self.__class__.__name__) 85 return
86 # version 87 __id__ = "$Id: exceptions.py 6300 2011-03-10 21:34:27Z yshang $" 88 89 # End of file 90