mpqc::detail::Exception Class Reference
Collaboration diagram for mpqc::detail::Exception:

Documentation

This is a std::exception specialization that records information about where an exception took place. It serves as the basis for all Exceptions thrown by MPQC.

Public Member Functions

 Exception (const char *description=0, const char *file=0, int line=0) noexcept
 
 Exception (const Exception &)=default
 
 Exception (Exception &&)=default
 
virtual ~Exception () noexcept
 
const char * description () const noexcept
 
const char * file () const noexcept
 
int line () const noexcept
 

Constructor & Destructor Documentation

◆ Exception() [1/3]

mpqc::detail::Exception::Exception ( const char *  description = 0,
const char *  file = 0,
int  line = 0 
)
noexcept

Create an Exception.

Parameters
descriptiona description of the problem.
filethe file name where the problem occured.
linethe line number where the exception occured.

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

◆ Exception() [2/3]

mpqc::detail::Exception::Exception ( const Exception )
default

◆ Exception() [3/3]

mpqc::detail::Exception::Exception ( Exception &&  )
default

◆ ~Exception()

mpqc::detail::Exception::~Exception ( )
virtualnoexcept

Reimplemented in mpqc::Exception.

Member Function Documentation

◆ description()

const char* mpqc::detail::Exception::description ( ) const
inlinenoexcept

Reimplementation of std::exception::what(). The returned std::string is only valid for the lifetime of this object. Returns a description of what caused the exception. May return null.

◆ file()

const char* mpqc::detail::Exception::file ( ) const
inlinenoexcept

Returns the name of the file in which the exception was created. May return null.

◆ line()

int mpqc::detail::Exception::line ( ) const
inlinenoexcept

Returns the line number where the exception was created. May return 0, if unknown.


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