Psi4
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
psi::PsiException Class Reference

#include <exception.h>

Inheritance diagram for psi::PsiException:
psi::BasisSetFileNotFound psi::BasisSetNotFound psi::DataTypeException psi::DuplicateKeyException psi::FeatureNotImplemented psi::IndexException psi::InputException psi::LimitExceeded< T > psi::NotImplementedException_ psi::OptionsException psi::SanityCheckError psi::SystemError

Public Member Functions

 PsiException (std::string message, const char *file, int line) throw ()
 
 PsiException (const PsiException &copy) throw ()
 
virtual ~PsiException () throw ()
 
PsiExceptionoperator= (const PsiException &other)
 
const char * what () const throw ()
 
const char * file () const throw ()
 
const char * location () const throw ()
 
int line () const throw ()
 

Protected Member Functions

void rewrite_msg (std::string msg) throw ()
 

Private Attributes

std::string msg_
 
const char * file_
 
int line_
 

Detailed Description

Generic exception class for Psi4

Constructor & Destructor Documentation

psi::PsiException::PsiException ( std::string  message,
const char *  file,
int  line 
)
throw (
)

Constructor

Parameters
messageThe message that will be printed by exception
fileThe file that threw the exception (use FILE macro)
lineThe line number that threw the exception (use LINE macro)
psi::PsiException::PsiException ( const PsiException copy)
throw (
)
psi::PsiException::~PsiException ( )
throw (
)
virtual

Member Function Documentation

const char * psi::PsiException::file ( ) const
throw (
)

Accessor method

Returns
File that threw the exception
int psi::PsiException::line ( ) const
throw (
)

Accessor method

Returns
The line number that threw the exception
const char * psi::PsiException::location ( ) const
throw (
)

Accessor method

Returns
A string description of line and file that threw exception
PsiException& psi::PsiException::operator= ( const PsiException other)
inline
void psi::PsiException::rewrite_msg ( std::string  msg)
throw (
)
protected

Override default message for exception throw in what

Parameters
msgThe message for what to throw
const char * psi::PsiException::what ( ) const
throw (
)

Override of runtime_error's virtual what method

Returns
Description of exception

Member Data Documentation

const char* psi::PsiException::file_
private
int psi::PsiException::line_
private
std::string psi::PsiException::msg_
private

The documentation for this class was generated from the following files: