CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
edm::convertException Namespace Reference

Functions

void badAllocToEDM ()
 
void charPtrToEDM (char const *c)
 
void stdToEDM (std::exception const &e)
 
void stringToEDM (std::string &s)
 
void unknownToEDM ()
 
template<typename F >
auto wrap (F iFunc) -> decltype(iFunc())
 

Function Documentation

void edm::convertException::badAllocToEDM ( )

Definition at line 8 of file ConvertException.cc.

References edm::errors::BadAlloc, dtNoiseDBValidation_cfg::cerr, and alignCSCRings::e.

Referenced by wrap().

8  {
9  std::cerr << "\nstd::bad_alloc exception" << std::endl;
11  e << "A std::bad_alloc exception was thrown.\n"
12  << "The job has probably exhausted the virtual memory available to the process.\n";
13  throw e;
14  }
void edm::convertException::charPtrToEDM ( char const *  c)

Definition at line 30 of file ConvertException.cc.

References edm::errors::BadExceptionType, EnergyCorrector::c, and alignCSCRings::e.

Referenced by wrap().

30  {
32  e << "A const char* was thrown as an exception.\n"
33  << c;
34  throw e;
35  }
void edm::convertException::stdToEDM ( std::exception const &  e)

Definition at line 16 of file ConvertException.cc.

References edm::errors::StdException, and cms::Exception::what().

Referenced by wrap().

16  {
18  ex << "A std::exception was thrown.\n"
19  << e.what();
20  throw ex;
21  }
void edm::convertException::stringToEDM ( std::string &  s)

Definition at line 23 of file ConvertException.cc.

References edm::errors::BadExceptionType, alignCSCRings::e, and alignCSCRings::s.

Referenced by wrap().

23  {
25  e << "A std::string was thrown as an exception.\n"
26  << s;
27  throw e;
28  }
void edm::convertException::unknownToEDM ( )

Definition at line 37 of file ConvertException.cc.

References alignCSCRings::e, and edm::errors::Unknown.

Referenced by wrap().

37  {
39  e << "An exception of unknown type was thrown.\n";
40  throw e;
41  }
template<typename F >
auto edm::convertException::wrap ( F  iFunc) -> decltype( iFunc() )

Definition at line 18 of file ConvertException.h.

References badAllocToEDM(), charPtrToEDM(), cppFunctionSkipper::exception, stdToEDM(), AlCaHLTBitMon_QueryRunRegistry::string, stringToEDM(), and unknownToEDM().

Referenced by edm::eventsetup::ComponentFactory< T >::addTo(), edm::Worker::beginJob(), edm::EventProcessor::beginJob(), edm::Worker::beginStream(), edm::ExceptionCollector::call(), edm::callWithTryCatchAndPrint(), edm::convert_handle(), edm::serviceregistry::ServicesManager::createServices(), edm::eventsetup::EventSetupRecord::doGet(), edm::Worker::doWork(), edm::WorkerManager::endJob(), edm::Worker::endJob(), edm::Worker::endStream(), edm::eventsetup::EventSetupRecord::getFromProxy(), edm::makeInput(), edm::Maker::makeModule(), edm::StreamSchedule::processOneEvent(), edm::GlobalSchedule::processOneGlobal(), edm::WorkerManager::processOneOccurrence(), edm::Path::processOneOccurrence(), edm::StreamSchedule::processOneStream(), edm::EventProcessor::runToCompletion(), and edm::eventsetup::validateEventSetupParameters().

18  {
19  try {
20  return iFunc();
21  }
22  catch (cms::Exception& e) { throw; }
23  catch(std::bad_alloc& bda) { convertException::badAllocToEDM(); }
26  catch(char const* c) { convertException::charPtrToEDM(c); }
27  catch (...) { convertException::unknownToEDM(); }
28  //Never gets here
29  typedef decltype(iFunc()) ReturnType;
31  }
return((rh^lh)&mask)
std::map< DetId, double > ReturnType
void stdToEDM(std::exception const &e)
void charPtrToEDM(char const *c)
void stringToEDM(std::string &s)