LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
24 #ifndef LSST_PEX_EXCEPTIONS_EXCEPTION_H
25 #define LSST_PEX_EXCEPTIONS_EXCEPTION_H
33 #include "boost/current_function.hpp"
37 namespace exceptions {
40 #define LSST_EXCEPT_HERE __FILE__, __LINE__, BOOST_CURRENT_FUNCTION
48 #define LSST_EXCEPT(type, ...) type(LSST_EXCEPT_HERE, __VA_ARGS__)
54 #define LSST_EXCEPT_ADD(e, m) e.addMessage(LSST_EXCEPT_HERE, m)
57 #define LSST_EARGS_TYPED char const *ex_file, int ex_line, char const *ex_func, std::string const &ex_message
60 #define LSST_EARGS_UNTYPED ex_file, ex_line, ex_func, ex_message
69 #define LSST_EXCEPTION_TYPE(t, b, c) \
70 class LSST_EXPORT t : public b { \
72 t(LSST_EARGS_TYPED) : b(LSST_EARGS_UNTYPED){}; \
73 t(std::string const& message) : b(message){}; \
74 virtual char const* getType(void) const noexcept { return #c " *"; }; \
75 virtual lsst::pex::exceptions::Exception* clone(void) const { return new t(*this); }; \
145 Traceback const& getTraceback(
void)
const noexcept;
166 virtual char const* what(
void)
const noexcept;
175 virtual char const* getType(
void)
const noexcept;
std::vector< Tracepoint > Traceback
#define LSST_EXPORT
Make a symbol visible even if visiblity is hidden (e.g.
def line(points, frame=None, origin=afwImage.PARENT, symbs=False, ctype=None, size=0.5)
A base class for image defects.
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.