LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
#include <Exception.h>
Public Member Functions | |
Exception (char const *file, int line, char const *func, std::string const &message) | |
Exception (std::string const &message) | |
virtual | ~Exception (void) throw () |
void | addMessage (char const *file, int line, char const *func, std::string const &message) |
Traceback const & | getTraceback (void) const throw () |
Retrieve the list of tracepoints associated with an exception. More... | |
virtual std::ostream & | addToStream (std::ostream &stream) const |
virtual char const * | what (void) const throw () |
virtual char const * | getType (void) const throw () |
virtual Exception * | clone (void) const |
Private Attributes | |
std::string | _message |
Traceback | _traceback |
Definition at line 99 of file Exception.h.
Exception::Exception | ( | char const * | file, |
int | line, | ||
char const * | func, | ||
std::string const & | message | ||
) |
Standard constructor, intended for C++ use via the LSST_EXCEPT() macro.
[in] | file | Filename (automatically passed in by macro). |
[in] | line | Line number (automatically passed in by macro). |
[in] | func | Function name (automatically passed in by macro). |
[in] | message | Informational string attached to exception. |
Definition at line 44 of file Exception.cc.
|
explicit |
Message-only constructor, intended for use from Python only.
While this constructor can be called from C++, it's better to use the LSST_EXCEPT macro there, which stores file/line/function information as well. In Python, however, that information is stored outside the exception, so we don't want to duplicate it, and hence this constructor is invoked instead.
[in] | message | Informational string attached to exception. |
Definition at line 49 of file Exception.cc.
|
virtual |
Definition at line 53 of file Exception.cc.
void Exception::addMessage | ( | char const * | file, |
int | line, | ||
char const * | func, | ||
std::string const & | message | ||
) |
Add a tracepoint and a message to an exception before rethrowing it (access via LSST_EXCEPT_ADD).
[in] | file | Filename (automatically passed in by macro). |
[in] | line | Line number (automatically passed in by macro). |
[in] | func | Function name (automatically passed in by macro). |
[in] | message | Additional message to associate with this rethrow. |
Definition at line 55 of file Exception.cc.
|
virtual |
Add a text representation of this exception, including its traceback with messages, to a stream.
[in] | stream | Reference to an output stream. |
Definition at line 93 of file Exception.cc.
|
virtual |
Return a copy of the exception as an Exception*. Can be overridden by derived classes that add data or methods.
Definition at line 120 of file Exception.cc.
Traceback const & Exception::getTraceback | ( | void | ) | const | |
throw | ( | ||||
) |
Retrieve the list of tracepoints associated with an exception.
Definition at line 89 of file Exception.cc.
|
virtual |
Return the fully-specified C++ type of a pointer to the exception. This is overridden by derived classes (automatically if the LSST_EXCEPTION_TYPE macro is used). It is used by the SWIG interface.
Definition at line 116 of file Exception.cc.
|
virtual |
Return a character string summarizing this exception.
This combines all the messages added to the exception, but not the type or traceback (use the stream operator to get this more detailed information).
Not allowed to throw any exceptions.
Definition at line 112 of file Exception.cc.
|
private |
Definition at line 174 of file Exception.h.
|
private |
Definition at line 175 of file Exception.h.