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) noexcept
 
max_value () const noexcept
 
actual_value () const noexcept
 
virtual ~LimitExceeded () noexcept
 
- Public Member Functions inherited from psi::PsiException
 PsiException (std::string message, const char *file, int line) noexcept
 
 PsiException (const PsiException &copy) noexcept
 
virtual ~PsiException () noexcept
 
PsiExceptionoperator= (const PsiException &other)
 
const char * what () const noexcept
 
const char * file () const noexcept
 
const char * location () const noexcept
 
int line () const noexcept
 

Protected Member Functions

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

Private Attributes

maxval_
 
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,
maxval,
errorval,
const char *  f,
int  l 
)
inlinenoexcept

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 ( )
inlinevirtualnoexcept

Member Function Documentation

template<class T >
T psi::LimitExceeded< T >::actual_value ( ) const
inlinenoexcept
template<class T >
const char* psi::LimitExceeded< T >::description ( ) const
inlineprotectednoexcept

Accessor method

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

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: