Gui: [skip ci] fix Gui.subgraphFromObject and improve error text if wrapping fails
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
#include "PyExport.h"
|
||||
#include "Exception.h"
|
||||
#include <sstream>
|
||||
#if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
|
||||
@@ -29,8 +29,11 @@ int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int
|
||||
|
||||
swig_type_info * swig_type = 0;
|
||||
swig_type = SWIG_TypeQuery(TypeName);
|
||||
if (!swig_type)
|
||||
throw Base::RuntimeError("Cannot find type information for requested type");
|
||||
if (!swig_type) {
|
||||
std::stringstream str;
|
||||
str << "SWIG: Cannot find type information for requested type: " << TypeName;
|
||||
throw Base::RuntimeError(str.str());
|
||||
}
|
||||
|
||||
*ptr = SWIG_NewPointerObj(obj,swig_type,own);
|
||||
if (*ptr == 0)
|
||||
|
||||
Reference in New Issue
Block a user