MPQC  3.0.0-alpha
sc::Exception Class Reference

This is a std::exception specialization that records information about where an exception took place. More...

#include <util/misc/exception.h>

Inheritance diagram for sc::Exception:
sc::SCException mpqc::TensorDimensionsException mpqc::TensorIndexException mpqc::TensorRangeException sc::AlgorithmException sc::AssertionFailed sc::InputError sc::LimitExceeded< T > sc::ProgrammingError sc::SystemException

Public Member Functions

 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

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.

Constructor & Destructor Documentation

◆ Exception()

sc::Exception::Exception ( const char *  description = 0,
const char *  file = 0,
int  line = 0 
)

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.

Member Function Documentation

◆ description()

const char* sc::Exception::description ( ) const
inline

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* sc::Exception::file ( ) const
inline

Returns the name of the file in which the exception was created.

May return null.

◆ line()

int sc::Exception::line ( ) const
inline

Returns the line number where the exception was created.

May return 0, if unknown.


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

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