|
Alexandria 2.32.0
SDC-CH common library for the Euclid project
|
#include <Exceptions.h>


Classes | |
| struct | Location |
| Traceback location. More... | |
Public Member Functions | |
| Exception () | |
| const std::list< Location > & | getTraceback () const |
| const Exception & | log (log4cpp::Priority::Value level, Elements::Logging &logger) const |
| Log error message and traceback. | |
| void | restore () const |
| Call PyErr_Restore and restore the error. This can be used when Pyston::Exception goes back to Python. | |
| Public Member Functions inherited from Elements::Exception | |
| Exception (ExitCode e=ExitCode::NOT_OK) | |
| Exception (const char *message, ExitCode e=ExitCode::NOT_OK) | |
| Exception (const std::string &message, ExitCode e=ExitCode::NOT_OK) | |
| Exception (const char *string_format, Args &&... args) | |
| Exception (const Exception &rhs)=default | |
| virtual | ~Exception () noexcept |
| const char * | what () const noexcept override |
| ExitCode | exitCode () const noexcept |
| void | appendMessage (const T &message) |
| Public Member Functions inherited from std::exception | |
| T | what (T... args) |
| T | ~exception (T... args) |
| T | operator= (T... args) |
| T | exception (T... args) |
Private Attributes | |
| std::list< Location > | m_traceback |
| boost::python::object | m_error_type |
| boost::python::object | m_error_value |
| boost::python::object | m_error_traceback |
Additional Inherited Members | |
| Protected Attributes inherited from Elements::Exception | |
| std::string | m_error_msg |
| const ExitCode | m_exit_code |
Exception class Used to wrap Python exceptions so the caller code can handle them transparently
Definition at line 33 of file Exceptions.h.
| Pyston::Exception::Exception | ( | ) |
Constructor The error message is retrieved from the exception thrown inside Python
Definition at line 30 of file Exceptions.cpp.
References Pyston::Exception::Location::filename, Pyston::Exception::Location::funcname, Pyston::Exception::Location::lineno, Elements::Exception::m_error_msg, m_error_traceback, m_error_type, m_error_value, and m_traceback.
Referenced by log().
| auto Pyston::Exception::getTraceback | ( | ) | const |
| const Exception & Pyston::Exception::log | ( | log4cpp::Priority::Value | level, |
| Elements::Logging & | logger ) const |
Log error message and traceback.
Definition at line 70 of file Exceptions.cpp.
References Exception(), logger, m_traceback, and std::stringstream::str().

| void Pyston::Exception::restore | ( | ) | const |
Call PyErr_Restore and restore the error. This can be used when Pyston::Exception goes back to Python.
Definition at line 79 of file Exceptions.cpp.
References m_error_traceback, m_error_type, and m_error_value.
|
private |
Definition at line 66 of file Exceptions.h.
Referenced by Exception(), and restore().
|
private |
Definition at line 64 of file Exceptions.h.
Referenced by Exception(), and restore().
|
private |
Definition at line 65 of file Exceptions.h.
Referenced by Exception(), and restore().
Definition at line 63 of file Exceptions.h.
Referenced by Exception(), getTraceback(), and log().