MPQC  3.0.0-alpha
sc::LimitExceeded< T > Class Template Reference

This is thrown when a limit is exceeded. More...

#include <util/misc/scexception.h>

Inheritance diagram for sc::LimitExceeded< T >:
sc::SCException sc::Exception

Public Member Functions

 LimitExceeded (const char *description, const char *file, int line, T lim, T val, const ClassDesc *class_desc=0, const char *exception_type=strdup((std::string("LimitExceeded<")+std::string(typeid(T).name())+std::string(">")).c_str())) MPQC__NOEXCEPT
 Create a LimitExceeded exception. More...
 
 LimitExceeded (const LimitExceeded &ref) MPQC__NOEXCEPT
 
tolerance () MPQC__NOEXCEPT
 The limit which was exceeded.
 
value () MPQC__NOEXCEPT
 The value which exceeded the limit.
 
- Public Member Functions inherited from sc::SCException
 SCException (const char *description=0, const char *file=0, int line=0, const ClassDesc *class_desc=0, const char *exception_type="SCException") MPQC__NOEXCEPT
 Create an SCException. More...
 
 SCException (const SCException &) MPQC__NOEXCEPT
 
const char * what () const MPQC__NOEXCEPT
 overload of Exception::what()
 
const ClassDescclass_desc () const MPQC__NOEXCEPT
 Returns the class descriptor of the object which generated the exception. More...
 
const char * exception_type () const MPQC__NOEXCEPT
 Returns the classname of the exception. May return null.
 
std::ostream & elaborate ()
 Returns a stream where additional information about the exception can be written. More...
 
- Public Member Functions inherited from sc::Exception
 Exception (const char *description=0, const char *file=0, int line=0) MPQC__NOEXCEPT
 Create an Exception. More...
 
 Exception (const Exception &) MPQC__NOEXCEPT
 
const char * description () const MPQC__NOEXCEPT
 Reimplementation of std::exception::what(). More...
 
const char * file () const MPQC__NOEXCEPT
 Returns the name of the file in which the exception was created. More...
 
int line () const MPQC__NOEXCEPT
 Returns the line number where the exception was created. More...
 

Detailed Description

template<class T>
class sc::LimitExceeded< T >

This is thrown when a limit is exceeded.

It is more general than ToleranceExceeded. For problems that are numerical in nature and use double types, then ToleranceExceeded should be used instead.

Constructor & Destructor Documentation

◆ LimitExceeded()

template<class T >
sc::LimitExceeded< T >::LimitExceeded ( const char *  description,
const char *  file,
int  line,
lim,
val,
const ClassDesc class_desc = 0,
const char *  exception_type = strdup((std::string("LimitExceeded<") + std::string(typeid(T).name()) + std::string(">")).c_str()) 
)
inline

Create a LimitExceeded exception.

Parameters
descriptiona description of the problem.
filethe file name where the problem occured.
linethe line number where the exception occured.
limthe limit.
valthe value which was obtained.
class_descthe ClassDesc for the object causing the exception.
exception_typethe classname of the SCException specialization. The default is "LimitExceeded".

It is suggested that the special macros FILE and LINE be given as the file and line arguments, respectively.

References sc::SCException::elaborate().


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

Generated at Sun Jan 26 2020 23:24:07 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.