/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/MessageLogger/src/ExceptionMessages.cc
36 строк
1 KB
W. David Dagenhart
Changes from scram build code-format-all
03 май 2019, 18:48
03 май 2019, 18:48
22c28dc
Код
Авторство
О чём код?
#include "FWCore/MessageLogger/interface/ExceptionMessages.h" #include "FWCore/Utilities/interface/Exception.h" #include "FWCore/MessageLogger/interface/JobReport.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/TimeOfDay.h" #include <string> #include <sstream> #include <iomanip> namespace edm { void printCmsException(cms::Exception& e, edm::JobReport* jobRep, int rc) try { std::string shortDesc("Fatal Exception"); std::ostringstream longDesc; longDesc << e.explainSelf(); LogAbsolute(shortDesc) << "----- Begin " << shortDesc << " " << std::setprecision(0) << TimeOfDay() << "-----------------------\n" << longDesc.str() << "----- End " << shortDesc << " -------------------------------------------------"; if (jobRep) jobRep->reportError(shortDesc, longDesc.str(), rc); } catch (...) { } void printCmsExceptionWarning(char const* behavior, cms::Exception const& e) try { std::string shortDesc(behavior); shortDesc += " Exception"; std::ostringstream longDesc; longDesc << e.explainSelf(); LogPrint(shortDesc) << "----- Begin " << shortDesc << " " << std::setprecision(0) << TimeOfDay() << "-----------------------\n" << longDesc.str() << "----- End " << shortDesc << " -------------------------------------------------"; } catch (...) { } } // namespace edm