App: fix ObjectIdentifier::getDep
+ it's an obscure way to clear the error state by instantiating PyException, instead use the clear() method + do not handle unknown exceptions because this suppresses all exceptions and thus makes error search more complicated
This commit is contained in:
@@ -1111,8 +1111,7 @@ ObjectIdentifier::getDep(bool needProps, std::vector<std::string> *labels) const
|
||||
return deps;
|
||||
}
|
||||
|
||||
void ObjectIdentifier::getDep(
|
||||
Dependencies &deps, bool needProps, std::vector<std::string> *labels) const
|
||||
void ObjectIdentifier::getDep(Dependencies &deps, bool needProps, std::vector<std::string> *labels) const
|
||||
{
|
||||
ResolveResults result(*this);
|
||||
if(labels)
|
||||
@@ -1134,10 +1133,10 @@ void ObjectIdentifier::getDep(
|
||||
|
||||
Base::PyGILStateLocker lock;
|
||||
try {
|
||||
access(result,0,&deps);
|
||||
}catch(Py::Exception &) {
|
||||
Base::PyException e;
|
||||
}catch(...){
|
||||
access(result, nullptr, &deps);
|
||||
}
|
||||
catch (Py::Exception& e) {
|
||||
e.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user