Source code for fudge.core.utilities.fudgeExceptions
# <<BEGIN-copyright>>
# <<END-copyright>>
"""
This module contains the fudge exception classes.
"""
[docs]class FUDGE_Exception( Exception ) :
"""This class is raised whenever fudge detects an error that is not handled by
another FUDGE/ENDL exception."""
def __init__( self, value ) :
"""This constructor should be called as
>>> raise FUDGE_Exception( "Put exception string here" )."""
self.value = value
def __str__( self ) :
"""Returns the string pass to the __init__ method."""
return repr( self.value )
[docs]class ENDL_CheckerException( FUDGE_Exception ) :
"""This class is raised whenever a check method detects bad ENDL data."""
[docs]class ENDL_numpyException( Exception ) :
"""This class is raised whenever an error is detected with the numpy module."""
[docs]class ENDL_DesignerIsotopeReadException( Exception ) :
"""This class is raised whenever read is called on a designer isotope."""
[docs]class ENDL_addFileException_FileExist( FUDGE_Exception ) :
"""This class is raised whenever endlZA.addFile is called and the file already exists."""