Package diffpy :: Package Structure :: Module StructureErrors
[hide private]
[frames] | no frames]

Source Code for Module diffpy.Structure.StructureErrors

 1  ############################################################################## 
 2  # 
 3  # Structure         by DANSE Diffraction group 
 4  #                   Simon J. L. Billinge 
 5  #                   (c) 2006 trustees of the Michigan State University. 
 6  #                   All rights reserved. 
 7  # 
 8  # File coded by:    Pavol Juhas 
 9  # 
10  # See AUTHORS.txt for a list of people who contributed. 
11  # See LICENSE.txt for license information. 
12  # 
13  ############################################################################## 
14   
15  """Exceptions used in Structure package. 
16  """ 
17   
18  __id__ = "$Id: StructureErrors.py 2825 2009-03-09 04:33:12Z juhas $" 
19   
20 -class StructureFormatError(Exception):
21 """Exception for failed IO from Structure file 22 """ 23
24 - def __init__(self, value):
25 self.value = value
26
27 - def __str__(self):
28 return self.value
29 30 # End of StructureFormatError 31 32
33 -class LatticeError(Exception):
34 """Exception for impossible lattice parameters. 35 """ 36
37 - def __init__(self, value):
38 self.value = value
39
40 - def __str__(self):
41 return self.value
42 43 # End of LatticeError 44 45
46 -class SymmetryError(Exception):
47 """Exception raised for invalid symmetry operations. 48 """ 49
50 - def __init__(self, value):
51 self.value = value
52
53 - def __str__(self):
54 return self.value
55 56 # End of SymmetryError 57 58
59 -class IsotropyError(Exception):
60 """Exception raised for invalid operations on isotropic atoms. 61 """ 62
63 - def __init__(self, value):
64 self.value = value
65
66 - def __str__(self):
67 return self.value
68 69 # End of IsotropyError 70