+
+ if ((aReason != Delegate::STATUS_REFRESHED) &&
+ (aReason != Delegate::STATUS_IN_PROGRESS) &&
+ (aReason != Delegate::STATUS_SUCCESS))
+ {
+ // catalog has errors, disable it
+ CatalogList::iterator j = std::find(d->disabledCatalogs.begin(),
+ d->disabledCatalogs.end(),
+ aCat);
+ if (j == d->disabledCatalogs.end()) {
+ SG_LOG(SG_GENERAL, SG_INFO, "disabling catalog:" << aCat->id());
+ d->disabledCatalogs.push_back(aCat);
+ }
+
+ // and remove it from the active collection
+ if (catIt != d->catalogs.end()) {
+ d->catalogs.erase(catIt);
+ }
+ } // of catalog has errors case
+