Skip to content

Commit

Permalink
Remove redundant addition of exception context
Browse files Browse the repository at this point in the history
In the exception context cleanup, a few redundant cases were missed.
  • Loading branch information
Dr15Jones committed Mar 23, 2017
1 parent 8811ec3 commit 29db97f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions FWCore/Framework/src/GlobalSchedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,11 @@ namespace edm {
worker->doWork<T>(p, es,StreamID::invalidStreamID(), parentContext, context);
}
catch (cms::Exception & ex) {
std::ostringstream ost;
ost << "Processing " <<T::transitionName()<<" "<< p.id();
ex.addContext(ost.str());
if(ex.context().empty()) {
std::ostringstream ost;
ost << "Processing " <<T::transitionName()<<" "<< p.id();
ex.addContext(ost.str());
}
throw;
}
}
Expand Down
8 changes: 5 additions & 3 deletions FWCore/Framework/src/StreamSchedule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,11 @@ namespace edm {
results_inserter_->doWork<Traits>(ep, es, streamID_, parentContext, &streamContext_);
}
catch (cms::Exception & ex) {
std::ostringstream ost;
ost << "Processing Event " << ep.id();
ex.addContext(ost.str());
if(ex.context().empty()) {
std::ostringstream ost;
ost << "Processing Event " << ep.id();
ex.addContext(ost.str());
}
iExcept = std::current_exception();
}
catch(...) {
Expand Down

0 comments on commit 29db97f

Please sign in to comment.