catch QString exceptions that ModelCache can throw

This commit is contained in:
Seth Alves 2018-11-19 15:25:14 -08:00
parent b72f462028
commit cd177a4457

View file

@ -243,6 +243,13 @@ void GeometryReader::run() {
QMetaObject::invokeMethod(resource.data(), "finishedLoading",
Q_ARG(bool, false));
}
} catch (QString& e) {
qCWarning(modelnetworking) << "Exception while loading" << _url << "--" << e;
auto resource = _resource.toStrongRef();
if (resource) {
QMetaObject::invokeMethod(resource.data(), "finishedLoading",
Q_ARG(bool, false));
}
}
}