LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
Exception to be thrown when a measurement algorithm experiences a known failure mode. More...
#include <exceptions.h>
Public Member Functions | |
MeasurementError (std::string const &message, std::size_t flagBit) | |
Constructor; should only be invoked from Python macro. More... | |
MeasurementError (LSST_EARGS_TYPED, std::size_t flagBit) | |
Constructor; should only be invoked by the LSST_EXCEPT macro (see class docs) More... | |
std::size_t | getFlagBit () const |
Return the flag bit associated with the error. More... | |
virtual char const * | getType (void) const throw () |
Return the fully-specified C++ type of a pointer to the exception. More... | |
virtual lsst::pex::exceptions::Exception * | clone (void) const |
Return a copy of the exception as an Exception pointer. More... | |
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). More... | |
Traceback const & | getTraceback (void) const noexcept |
Retrieve the list of tracepoints associated with an exception. More... | |
virtual std::ostream & | addToStream (std::ostream &stream) const |
Add a text representation of this exception, including its traceback with messages, to a stream. More... | |
virtual char const * | what (void) const noexcept |
Return a character string summarizing this exception. More... | |
T | what (T... args) |
Exception to be thrown when a measurement algorithm experiences a known failure mode.
In addition to the usual message, MeasurementError must be constructed with the bit of the algorithm-specific flag that indicates the known failure mode. This allows the measurement framework to set that flag upon failure. Typically, this flag bit is also used to look up the message from the algorithm classes FlagDefinition list; the common pattern is:
Definition at line 48 of file exceptions.h.
|
inline |
Constructor; should only be invoked from Python macro.
Definition at line 51 of file exceptions.h.
|
inline |
Constructor; should only be invoked by the LSST_EXCEPT macro (see class docs)
Definition at line 55 of file exceptions.h.
|
inherited |
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 49 of file Exception.cc.
|
virtualinherited |
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 81 of file Exception.cc.
|
inlinevirtual |
Return a copy of the exception as an Exception pointer.
Can be overridden by derived classes that add data or methods.
Reimplemented from lsst.pex::exceptions::Exception.
Definition at line 63 of file exceptions.h.
|
inline |
Return the flag bit associated with the error.
Definition at line 59 of file exceptions.h.
|
noexceptinherited |
Retrieve the list of tracepoints associated with an exception.
Definition at line 79 of file Exception.cc.
|
inlinevirtual |
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 Python interface.
Reimplemented from lsst.pex::exceptions::Exception.
Definition at line 61 of file exceptions.h.
|
virtualnoexceptinherited |
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 99 of file Exception.cc.