CMS 3D CMS Logo

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

◆ badAllocToEDM()

void edm::convertException::badAllocToEDM ( )

Definition at line 8 of file ConvertException.cc.

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  }

References edm::errors::BadAlloc, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, and MillePedeFileConverter_cfg::e.

Referenced by wrap().

◆ charPtrToEDM()

void edm::convertException::charPtrToEDM ( char const *  c)

Definition at line 28 of file ConvertException.cc.

28  {
30  e << "A const char* was thrown as an exception.\n" << c;
31  throw e;
32  }

References edm::errors::BadExceptionType, c, and MillePedeFileConverter_cfg::e.

Referenced by wrap().

◆ stdToEDM()

void edm::convertException::stdToEDM ( std::exception const &  e)

Definition at line 16 of file ConvertException.cc.

16  {
18  ex << "A std::exception was thrown.\n" << e.what();
19  throw ex;
20  }

References MillePedeFileConverter_cfg::e, and edm::errors::StdException.

Referenced by wrap().

◆ stringToEDM()

void edm::convertException::stringToEDM ( std::string &  s)

Definition at line 22 of file ConvertException.cc.

22  {
24  e << "A std::string was thrown as an exception.\n" << s;
25  throw e;
26  }

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

Referenced by wrap().

◆ unknownToEDM()

void edm::convertException::unknownToEDM ( )

Definition at line 34 of file ConvertException.cc.

34  {
36  e << "An exception of unknown type was thrown.\n";
37  throw e;
38  }

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

Referenced by wrap().

◆ wrap()

template<typename F >
auto edm::convertException::wrap ( F  iFunc) -> decltype(iFunc())

Definition at line 19 of file ConvertException.h.

19  {
20  // Caught exception is rethrown
21  CMS_SA_ALLOW try { return iFunc(); } catch (cms::Exception&) {
22  throw;
23  } catch (std::bad_alloc&) {
25  } catch (std::exception& e) {
27  } catch (std::string& s) {
29  } catch (char const* c) {
31  } catch (...) {
33  }
34  //Never gets here
35  typedef decltype(iFunc()) ReturnType;
37  }

References badAllocToEDM(), c, charPtrToEDM(), CMS_SA_ALLOW, MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, alignCSCRings::s, stdToEDM(), AlCaHLTBitMon_QueryRunRegistry::string, stringToEDM(), and unknownToEDM().

Referenced by edm::eventsetup::ComponentFactory< T >::addTo(), edm::EventProcessor::beginJob(), edm::Worker::beginJob(), edm::Worker::beginStream(), edm::ExceptionCollector::call(), edm::callWithTryCatchAndPrint(), edm::convert_handle(), edm::serviceregistry::ServicesManager::createServiceFor(), edm::detail::doTheOffset(), edm::WorkerManager::endJob(), edm::Worker::endJob(), edm::Worker::endStream(), edm::StreamSchedule::finishProcessOneEvent(), edm::eventsetup::EventSetupRecordImpl::getFromProxy(), edm::eventsetup::EventSetupRecordImpl::getFromProxyAfterPrefetch(), edm::Worker::handleExternalWorkException(), edm::makeInput(), edm::Maker::makeModule(), edm::GlobalSchedule::processOneGlobalAsync(), edm::StreamSchedule::processOneStreamAsync(), edm::Worker::runAcquire(), edm::Worker::runModule(), edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::runProducerAsync(), edm::EventProcessor::runToCompletion(), edm::Worker::shouldRethrowException(), edm::eventsetup::validateEventSetupParameters(), and edm::validateLooper().

edm::convertException::charPtrToEDM
void charPtrToEDM(char const *c)
Definition: ConvertException.cc:28
edm::errors::Unknown
Definition: EDMException.h:29
edm::convertException::unknownToEDM
void unknownToEDM()
Definition: ConvertException.cc:34
edm::errors::BadExceptionType
Definition: EDMException.h:31
mathSSE::return
return((rh ^ lh) &mask)
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::Exception
Definition: EDMException.h:77
alignCSCRings.s
s
Definition: alignCSCRings.py:92
ecaldqm::ReturnType
std::map< DetId, double > ReturnType
Definition: DBReaderWorkers.cc:54
edm::convertException::stringToEDM
void stringToEDM(std::string &s)
Definition: ConvertException.cc:22
edm::convertException::stdToEDM
void stdToEDM(std::exception const &e)
Definition: ConvertException.cc:16
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
edm::convertException::badAllocToEDM
void badAllocToEDM()
Definition: ConvertException.cc:8
edm::errors::StdException
Definition: EDMException.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::errors::BadAlloc
Definition: EDMException.h:30
cms::Exception
Definition: Exception.h:70
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37