#include <Interpreter.h>
Public Member Functions | |
const std::string & getErrorType (void) const | |
virtual PyObject * getPyExceptionType (void) const override | |
returns the corresponding python exception type More... | |
const std::string & getStackTrace (void) const | |
this function returns the stack trace More... | |
PyException (const Py::Object &obj) | |
PyException (void) | |
constructor does the whole job More... | |
void raiseException () | |
void ReportException (void) const override | |
Reports exception. It includes a mechanism to only report an exception once. More... | |
virtual void setPyException () const override | |
Sets the Python error indicator and an error message. More... | |
~PyException () throw () | |
![]() | |
std::string getFile () const | |
std::string getFunction () const | |
int getLine () const | |
std::string getMessage () const | |
virtual PyObject * getPyObject (void) | |
returns a Python dictionary containing the exception data More... | |
bool getReported () const | |
bool getTranslatable () const | |
virtual Base::Type getTypeId (void) const | |
Exception & operator= (const Exception &inst) | |
void setDebugInformation (const std::string &file, const int line, const std::string &function) | |
setter methods for including debug information intended to use via macro for autofilling of debugging information More... | |
void setMessage (const char *sMessage) | |
void setMessage (const std::string &sMessage) | |
virtual void setPyObject (PyObject *pydict) | |
returns sets the exception data from a Python dictionary More... | |
void setReported (bool reported) | |
void setTranslatable (bool translatable) | |
virtual const char * what (void) const throw () | |
virtual ~Exception () throw () | |
![]() | |
BaseClass () | |
Construction. More... | |
bool isDerivedFrom (const Type type) const | |
virtual ~BaseClass () | |
Destruction. More... | |
Static Public Member Functions | |
static void ThrowException (void) | |
this method determines if the original exception can be reconstructed or not, if yes throws the reconstructed version if not, throws a generic PyException. More... | |
![]() | |
static void * create (void) | |
static Base::Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
Additional Inherited Members | |
![]() | |
Exception (const char *sMessage) | |
Exception (const Exception &inst) | |
Exception (const std::string &sMessage) | |
Exception (void) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
Constructor & Destructor Documentation
◆ PyException() [1/2]
PyException::PyException | ( | void | ) |
constructor does the whole job
References Base::Exception::setPyObject().
◆ PyException() [2/2]
PyException::PyException | ( | const Py::Object & | obj | ) |
◆ ~PyException()
PyException::~PyException | ( | ) | ||
throw | ( | |||
) |
Member Function Documentation
◆ getErrorType()
const std::string& Base::PyException::getErrorType | ( | void | ) | const |
Referenced by setPyException().
◆ getPyExceptionType()
|
overridevirtual |
returns the corresponding python exception type
Reimplemented from Base::Exception.
Referenced by setPyException().
◆ getStackTrace()
const std::string& Base::PyException::getStackTrace | ( | void | ) | const |
this function returns the stack trace
Referenced by setPyException().
◆ raiseException()
void PyException::raiseException | ( | ) |
References Base::BaseExceptionFreeCADAbort, Base::ExceptionFactory::Instance(), and Base::ExceptionFactory::raiseException().
Referenced by ThrowException().
◆ ReportException()
|
overridevirtual |
Reports exception. It includes a mechanism to only report an exception once.
Reimplemented from Base::Exception.
References Base::Console(), Base::ConsoleSingleton::Error(), and Base::Exception::what().
Referenced by Gui::GestureNavigationStyle::onRollGesture(), and ThrowException().
◆ setPyException()
|
overridevirtual |
Sets the Python error indicator and an error message.
Reimplemented from Base::Exception.
References getErrorType(), getPyExceptionType(), getStackTrace(), and Base::Exception::what().
◆ ThrowException()
|
static |
this method determines if the original exception can be reconstructed or not, if yes throws the reconstructed version if not, throws a generic PyException.
References raiseException(), and ReportException().
Referenced by App::ObjectIdentifier::Component::del(), Gui::ViewProviderPythonFeatureImp::dropObject(), Gui::ViewProviderPythonFeatureImp::dropObjectEx(), App::FeaturePythonImp::execute(), App::ObjectIdentifier::Component::get(), App::ObjectIdentifier::getPyValue(), App::ObjectIdentifier::getValue(), App::isAnyEqual(), Base::InterpreterSingleton::runString(), App::ObjectIdentifier::Component::set(), and App::ObjectIdentifier::setValue().
The documentation for this class was generated from the following files:
- src/Base/Interpreter.h
- src/Base/Interpreter.cpp