Definition at line 104 of file wrappers.py.
◆ __getattr__()
def lsst.pex.exceptions.wrappers.Exception.__getattr__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
inherited |
Definition at line 73 of file wrappers.py.
73 def __getattr__(self, name):
74 return getattr(self.cpp, name)
◆ __repr__()
def lsst.pex.exceptions.wrappers.Exception.__repr__ |
( |
|
self | ) |
|
|
inherited |
Definition at line 76 of file wrappers.py.
77 return "%s('%s')" % (
type(self).__name__, self.cpp.what())
◆ __str__()
def lsst.pex.exceptions.wrappers.Exception.__str__ |
( |
|
self | ) |
|
|
inherited |
Definition at line 79 of file wrappers.py.
80 return self.cpp.asString()
◆ addMessage()
void Exception::addMessage |
( |
char const * |
file, |
|
|
int |
line, |
|
|
char const * |
func, |
|
|
std::string const & |
message |
|
) |
| |
|
inherited |
Add a tracepoint and a message to an exception before rethrowing it (access via LSST_EXCEPT_ADD).
- Parameters
-
[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.
52 if (_traceback.
empty()) {
63 stream <<
"; " << message;
73 stream << message <<
" {" << _traceback.
size() <<
"}";
76 _message = stream.
str();
def line(points, frame=None, origin=afwImage.PARENT, symbs=False, ctype=None, size=0.5)
◆ addToStream()
Add a text representation of this exception, including its traceback with messages, to a stream.
- Parameters
-
[in] | stream | Reference to an output stream. |
- Returns
- Reference to the output stream after adding the text.
Definition at line 81 of file Exception.cc.
82 if (_traceback.
empty()) {
89 stream <<
" File \"" << _traceback[i]._file <<
"\", line " << _traceback[i]._line <<
", in " 91 stream <<
" " << _traceback[i]._message <<
" {" << i <<
"}" <<
std::endl;
virtual char const * getType(void) const noexcept
Return the fully-specified C++ type of a pointer to the exception.
◆ clone()
Return a copy of the exception as an Exception pointer.
Can be overridden by derived classes that add data or methods.
- Returns
- Pointer to a copy of the exception.
Reimplemented in lsst.pex::policy::UnsupportedSyntax, lsst.pex::policy::FormatSyntaxError, lsst.pex::policy::SyntaxError, lsst.pex::policy::EOFError, lsst.pex::policy::TypeError, lsst.pex::policy::NameNotFound, lsst.pex::policy::DictionaryError, lsst.pex::policy::ParserError, lsst.pex::policy::BadNameError, and lsst::meas::base::MeasurementError.
Definition at line 103 of file Exception.cc.
Exception(char const *file, int line, char const *func, std::string const &message)
Standard constructor, intended for C++ use via the LSST_EXCEPT() macro.
◆ getTraceback()
Traceback const & Exception::getTraceback |
( |
void |
| ) |
const |
|
noexceptinherited |
Retrieve the list of tracepoints associated with an exception.
Definition at line 79 of file Exception.cc.
79 {
return _traceback; }
◆ getType()
char const * Exception::getType |
( |
void |
| ) |
const |
|
virtualnoexceptinherited |
◆ what()
char const * Exception::what |
( |
void |
| ) |
const |
|
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.
- Returns
- String representation; does not need to be freed/deleted.
Definition at line 99 of file Exception.cc.
99 {
return _message.
c_str(); }
◆ cpp
lsst.pex.exceptions.wrappers.Exception.cpp |
|
inherited |
◆ WrappedClass
The documentation for this class was generated from the following file:
- /j/snowflake/release/lsstsw/stack/Linux64/pex_exceptions/18.1.0/python/lsst/pex/exceptions/wrappers.py