CMS 3D CMS Logo

ExceptionMessages.cc
Go to the documentation of this file.
6 
7 #include <string>
8 #include <sstream>
9 #include <iomanip>
10 
11 namespace edm {
12  void printCmsException(cms::Exception& e, edm::JobReport* jobRep, int rc) try {
13  std::string shortDesc("Fatal Exception");
14  std::ostringstream longDesc;
15  longDesc << e.explainSelf();
16  LogAbsolute(shortDesc) << "----- Begin " << shortDesc << " " << std::setprecision(0) << TimeOfDay()
17  << "-----------------------\n"
18  << longDesc.str() << "----- End " << shortDesc
19  << " -------------------------------------------------";
20  if (jobRep)
21  jobRep->reportError(shortDesc, longDesc.str(), rc);
22  } catch (...) {
23  }
24 
25  void printCmsExceptionWarning(char const* behavior, cms::Exception const& e) try {
26  std::string shortDesc(behavior);
27  shortDesc += " Exception";
28  std::ostringstream longDesc;
29  longDesc << e.explainSelf();
30  LogPrint(shortDesc) << "----- Begin " << shortDesc << " " << std::setprecision(0) << TimeOfDay()
31  << "-----------------------\n"
32  << longDesc.str() << "----- End " << shortDesc
33  << " -------------------------------------------------";
34  } catch (...) {
35  }
36 } // namespace edm
edm::LogAbsolute
Definition: MessageLogger.h:469
MessageLogger.h
edm::TimeOfDay
Definition: TimeOfDay.h:9
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::printCmsExceptionWarning
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)
Definition: ExceptionMessages.cc:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ExceptionMessages.h
edm::LogPrint
Definition: MessageLogger.h:342
Exception.h
cms::Exception
Definition: Exception.h:70
JobReport.h
TimeOfDay.h
edm::JobReport::reportError
void reportError(std::string const &shortDesc, std::string const &longDesc, int const &exitCode)
Definition: JobReport.cc:493
edm::printCmsException
void printCmsException(cms::Exception &e, edm::JobReport *jobRep=nullptr, int rc=-1)
Definition: ExceptionMessages.cc:12
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
edm::JobReport
Definition: JobReport.h:103