/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/Framework/src/exceptionContext.cc
32 строки
1 KB
Matti Kortelainen
Add ED module context to EventSetup exceptions only if there is one
24 окт 2023, 00:43
24 окт 2023, 00:43
afd1dd1
Код
Авторство
О чём код?
#include "FWCore/ServiceRegistry/interface/ESModuleCallingContext.h" #include "FWCore/ServiceRegistry/interface/ParentContext.h" #include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h" #include "FWCore/Utilities/interface/EDMException.h" #include "FWCore/Framework/interface/ComponentDescription.h" #include <ostream> namespace edm { void exceptionContext(cms::Exception& ex, ESModuleCallingContext const& mcc) { ESModuleCallingContext const* imcc = &mcc; while (true) { std::ostringstream iost; if (imcc->state() == ESModuleCallingContext::State::kPrefetching) { iost << "Prefetching for EventSetup module "; } else { iost << "Calling method for EventSetup module "; } iost << imcc->componentDescription()->type_ << "/'" << imcc->componentDescription()->label_ << "'"; ex.addContext(iost.str()); if (imcc->type() != ESParentContext::Type::kESModule) { break; } imcc = imcc->esmoduleCallingContext(); } if (imcc->type() == ESParentContext::Type::kModule) { edm::exceptionContext(ex, *imcc->moduleCallingContext()); } } } // namespace edm