mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 03:46:11 +00:00
Print Python Errors from setupPlugin() and setupInterface()
This commit is contained in:
parent
73c40da3f9
commit
7798021f03
@ -47,6 +47,7 @@ void CutterPythonPlugin::setupPlugin(CutterCore *core)
|
||||
PyObject *result = PyObject_CallMethod(pInstance, "setupPlugin", nullptr);
|
||||
if (!result) {
|
||||
qWarning() << "Error in setupPlugin().";
|
||||
PyErr_Print();
|
||||
Python()->saveThread();
|
||||
}
|
||||
Py_DECREF(result);
|
||||
@ -79,6 +80,10 @@ CutterDockWidget* CutterPythonPlugin::setupInterface(MainWindow *main, QAction *
|
||||
PyObject *pWidget = nullptr;
|
||||
Python()->restoreThread();
|
||||
pWidget = PyObject_CallMethod(pInstance, "setupInterface", nullptr);
|
||||
if (!pWidget) {
|
||||
qWarning() << "Error in setupInterface().";
|
||||
PyErr_Print();
|
||||
}
|
||||
Python()->saveThread();
|
||||
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user