CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
edm::ExceptionCollector Class Reference

#include <ExceptionCollector.h>

Public Member Functions

void call (boost::function< void(void)>)
 
 ExceptionCollector ()
 
bool hasThrown () const
 
void rethrow () const
 
 ~ExceptionCollector ()
 

Private Attributes

cms::Exception exception_
 
bool hasThrown_
 

Detailed Description

Definition at line 29 of file ExceptionCollector.h.

Constructor & Destructor Documentation

edm::ExceptionCollector::ExceptionCollector ( )
inline

Definition at line 31 of file ExceptionCollector.h.

31 : exception_(std::string()), hasThrown_(false) {}
edm::ExceptionCollector::~ExceptionCollector ( )
inline

Definition at line 32 of file ExceptionCollector.h.

32 {}

Member Function Documentation

void edm::ExceptionCollector::call ( boost::function< void(void)>  f)

Definition at line 10 of file ExceptionCollector.cc.

References cmsCodeRules.cppFunctionSkipper::exception, exception_, f, hasThrown_, and cms::Exception::what().

Referenced by edm::EventProcessor::endJob().

10  {
11  try {
12  f();
13  }
14  catch (cms::Exception const& e) {
15  hasThrown_ = true;
16  exception_ << e;
17  }
18  catch (std::exception const& e) {
19  hasThrown_ = true;
20  exception_ << e.what();
21  }
22  catch (...) {
23  hasThrown_ = true;
24  exception_ << "Unknown exception";
25  }
26  }
virtual char const * what() const
Definition: Exception.cc:97
double f[11][100]
bool edm::ExceptionCollector::hasThrown ( ) const
inline

Definition at line 33 of file ExceptionCollector.h.

References hasThrown_.

Referenced by edm::EventProcessor::endJob().

void edm::ExceptionCollector::rethrow ( void  ) const

Definition at line 5 of file ExceptionCollector.cc.

References exception_.

Referenced by edm::EventProcessor::endJob().

5  {
6  throw exception_;
7  }

Member Data Documentation

cms::Exception edm::ExceptionCollector::exception_
private

Definition at line 38 of file ExceptionCollector.h.

Referenced by call(), and rethrow().

bool edm::ExceptionCollector::hasThrown_
private

Definition at line 39 of file ExceptionCollector.h.

Referenced by call(), and hasThrown().