mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +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);
|
PyObject *result = PyObject_CallMethod(pInstance, "setupPlugin", nullptr);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
qWarning() << "Error in setupPlugin().";
|
qWarning() << "Error in setupPlugin().";
|
||||||
|
PyErr_Print();
|
||||||
Python()->saveThread();
|
Python()->saveThread();
|
||||||
}
|
}
|
||||||
Py_DECREF(result);
|
Py_DECREF(result);
|
||||||
@ -79,6 +80,10 @@ CutterDockWidget* CutterPythonPlugin::setupInterface(MainWindow *main, QAction *
|
|||||||
PyObject *pWidget = nullptr;
|
PyObject *pWidget = nullptr;
|
||||||
Python()->restoreThread();
|
Python()->restoreThread();
|
||||||
pWidget = PyObject_CallMethod(pInstance, "setupInterface", nullptr);
|
pWidget = PyObject_CallMethod(pInstance, "setupInterface", nullptr);
|
||||||
|
if (!pWidget) {
|
||||||
|
qWarning() << "Error in setupInterface().";
|
||||||
|
PyErr_Print();
|
||||||
|
}
|
||||||
Python()->saveThread();
|
Python()->saveThread();
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user