LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
25 #define __attribute__(x)
37 namespace exceptions {
40 : _file(
file), _line(
line), _func(func), _message(message) {}
52 if (_traceback.
empty()) {
63 stream <<
"; " << message;
73 stream << message <<
" {" << _traceback.
size() <<
"}";
76 _message = stream.
str();
82 if (_traceback.
empty()) {
89 stream <<
" File \"" << _traceback[i]._file <<
"\", line " << _traceback[i]._line <<
", in "
91 stream <<
" " << _traceback[i]._message <<
" {" << i <<
"}" <<
std::endl;
virtual std::ostream & addToStream(std::ostream &stream) const
Add a text representation of this exception, including its traceback with messages,...
virtual Exception * clone(void) const
Return a copy of the exception as an Exception pointer.
Traceback const & getTraceback(void) const noexcept
Retrieve the list of tracepoints associated with an exception.
def line(points, frame=None, origin=afwImage.PARENT, symbs=False, ctype=None, size=0.5)
A base class for image defects.
virtual char const * getType(void) const noexcept
Return the fully-specified C++ type of a pointer to the exception.
void 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).
std::ostream & operator<<(std::ostream &stream, Exception const &e)
Push the text representation of an exception onto a stream.
Provides consistent interface for LSST exceptions.
One point in the Traceback vector held by Exception.
Tracepoint(char const *file, int line, char const *func, std::string const &message)
Standard constructor, intended for C++ use.
Exception(char const *file, int line, char const *func, std::string const &message)
Standard constructor, intended for C++ use via the LSST_EXCEPT() macro.
virtual char const * what(void) const noexcept
Return a character string summarizing this exception.
virtual ~Exception(void) noexcept