Chemistry.exceptions package¶
Submodules¶
Chemistry.exceptions.ParseErrors module¶
Specific exceptions and errors raised during the parsing of chemical data files. Deprecated, along with the entire Chemistry.parsing package. Will be removed once complete support of OpenBabel is achieved.
- exception Chemistry.exceptions.ParseErrors.ParsingException(filetype, msg='An error occurred while parsing a {} file')[source]¶
Bases: exceptions.Exception
A generic exception to be thrown if there is an error with the parsing of a chemical data file.
Parameters: filetype : string
The type of file that was being parsed.
msg : string, optional
The error message. A default message is provided, however an actual message is encouraged.
- message = 'An error occurred while parsing a {} file'¶
- exception Chemistry.exceptions.ParseErrors.UnsupportedFileTypeException(msg, filetype)[source]¶
Bases: Chemistry.exceptions.ParseErrors.ParsingException
Exception to be raised if a file is supplied for parsing that is not yet supported.
Parameters: msg : string
The error message.
filetype : string
The filetype that is not currently supported.
Chemistry.exceptions.ReactionErrors module¶
Errors associated with chemical reactions.
- exception Chemistry.exceptions.ReactionErrors.NoReactionError(msg='No reaction occurred')[source]¶
Bases: Chemistry.exceptions.ReactionErrors.ReactionError
A specific reaction error that should be thrown if the given scenario would not give rise to that specific type of reaction.
Parameters: msg : string, optional
The error message.
- err_message = 'No reaction occurred'¶
- exception Chemistry.exceptions.ReactionErrors.ReactionError(message=None, **kwargs)[source]¶
Bases: exceptions.Exception
A generic error to be thrown when there is an error with a reaction that does not have any specific error to be thrown.
- err_message = 'There was an error with the reaction'¶
- pka = '\n AcidBase reaction between {} and {} failed because of pka difference {}\n ({} to {})\n '¶
Module contents¶
Exceptions used throughout the program.