src
FWCore
Framework
src
exceptionContext.cc
Go to the documentation of this file.
1
#include "
FWCore/ServiceRegistry/interface/ESModuleCallingContext.h
"
2
#include "
FWCore/ServiceRegistry/interface/ParentContext.h
"
3
#include "
FWCore/ServiceRegistry/interface/ModuleCallingContext.h
"
4
#include "
FWCore/Utilities/interface/EDMException.h
"
5
#include "
FWCore/Framework/interface/ComponentDescription.h
"
6
7
#include <ostream>
8
9
namespace
edm
{
10
11
void
exceptionContext
(
cms::Exception
& ex,
ESModuleCallingContext
const
& mcc) {
12
ESModuleCallingContext
const
* imcc = &mcc;
13
while
(
true
) {
14
std::ostringstream iost;
15
if
(imcc->
state
() ==
ESModuleCallingContext::State::kPrefetching
) {
16
iost <<
"Prefetching for EventSetup module "
;
17
}
else
{
18
iost <<
"Calling method for EventSetup module "
;
19
}
20
iost << imcc->
componentDescription
()->
type_
<<
"/'"
<< imcc->
componentDescription
()->
label_
<<
"'"
;
21
22
ex.
addContext
(iost.str());
23
if
(imcc->
type
() !=
ESParentContext::Type::kESModule
) {
24
break
;
25
}
26
imcc = imcc->
esmoduleCallingContext
();
27
}
28
edm::exceptionContext
(ex, *imcc->
moduleCallingContext
());
29
}
30
}
// namespace edm
edm::eventsetup::ComponentDescription::label_
std::string label_
Definition:
ComponentDescription.h:31
edm::ESModuleCallingContext::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition:
ESModuleCallingContext.h:51
edm::exceptionContext
void exceptionContext(cms::Exception &, ESModuleCallingContext const &)
Definition:
exceptionContext.cc:11
edm::ESModuleCallingContext::type
Type type() const
Definition:
ESModuleCallingContext.h:49
edm::ESModuleCallingContext::esmoduleCallingContext
ESModuleCallingContext const * esmoduleCallingContext() const
Definition:
ESModuleCallingContext.h:52
edm::ESModuleCallingContext
Definition:
ESModuleCallingContext.h:27
ParentContext.h
EDMException.h
edm::ESModuleCallingContext::state
State state() const
Definition:
ESModuleCallingContext.h:48
edm::ESModuleCallingContext::State::kPrefetching
ComponentDescription.h
edm::eventsetup::ComponentDescription::type_
std::string type_
Definition:
ComponentDescription.h:32
cms::Exception
Definition:
Exception.h:71
edm::ESParentContext::Type::kESModule
cms::Exception::addContext
void addContext(std::string const &context)
Definition:
Exception.cc:169
edm
HLT enums.
Definition:
AlignableModifier.h:19
ESModuleCallingContext.h
ModuleCallingContext.h
edm::ESModuleCallingContext::componentDescription
edm::eventsetup::ComponentDescription const * componentDescription() const
Definition:
ESModuleCallingContext.h:47
Generated for CMSSW Reference Manual by
1.8.14