Psi4
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
psi::LimitExceeded< T > Class Template Reference

#include <exception.h>

Inheritance diagram for psi::LimitExceeded< T >:
psi::PsiException psi::MaxIterationsExceeded< T > psi::ResourceAllocationError< T > psi::StepSizeError< T > psi::ConvergenceError< T >

Public Member Functions

 LimitExceeded (std::string resource_name, T maxval, T errorval, const char *f, int l) throw ()
 
T max_value () const throw ()
 
T actual_value () const throw ()
 
virtual ~LimitExceeded () throw ()
 
- Public Member Functions inherited from psi::PsiException
 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

const char * description () const throw ()
 
- Protected Member Functions inherited from psi::PsiException
void rewrite_msg (std::string msg) throw ()
 

Private Attributes

T maxval_
 
T errorval_
 
std::string resource_name_
 

Detailed Description

template<class T>
class psi::LimitExceeded< T >

A generic template class for exceptions in which a min or max value is exceed

Constructor & Destructor Documentation

template<class T >
psi::LimitExceeded< T >::LimitExceeded ( std::string  resource_name,
T  maxval,
T  errorval,
const char *  f,
int  l 
)
throw (
)
inline

Constructor

Parameters
resource_nameThe name of the value that was exceeded (e.g. memory or scf max iterations)
maxvalThe max (or min) value allowed
errorvalThe actual value obtained
fThe file that threw the exception (use FILE macro)
lThe line number that threw the exception (use LINE macro)
template<class T >
virtual psi::LimitExceeded< T >::~LimitExceeded ( )
throw (
)
inlinevirtual

Member Function Documentation

template<class T >
T psi::LimitExceeded< T >::actual_value ( ) const
throw (
)
inline
template<class T >
const char* psi::LimitExceeded< T >::description ( ) const
throw (
)
inlineprotected

Accessor method

Returns
A string description of the limit that was exceeded
template<class T >
T psi::LimitExceeded< T >::max_value ( ) const
throw (
)
inline

Member Data Documentation

template<class T >
T psi::LimitExceeded< T >::errorval_
private
template<class T >
T psi::LimitExceeded< T >::maxval_
private
template<class T >
std::string psi::LimitExceeded< T >::resource_name_
private

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