MPQC
3.0.0-alpha
|
This is a std::exception specialization that records information about where an exception took place. More...
#include <util/misc/exception.h>
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... | |
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.
sc::Exception::Exception | ( | const char * | description = 0 , |
const char * | file = 0 , |
||
int | line = 0 |
||
) |
Create an Exception.
description | a description of the problem. |
file | the file name where the problem occured. |
line | the 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.
|
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.
|
inline |
Returns the name of the file in which the exception was created.
May return null.
|
inline |
Returns the line number where the exception was created.
May return 0, if unknown.