CMS 3D CMS Logo

edm::ExceptionCollector Class Reference

#include <FWCore/Utilities/interface/ExceptionCollector.h>

List of all members.

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.

00031 : exception_(std::string()), hasThrown_(false) {}

edm::ExceptionCollector::~ExceptionCollector (  )  [inline]

Definition at line 32 of file ExceptionCollector.h.

00032 {}


Member Function Documentation

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

Definition at line 10 of file ExceptionCollector.cc.

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

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

00010                                                       {
00011     try {
00012       f();
00013     }
00014     catch (cms::Exception e) {
00015       hasThrown_ = true;
00016       exception_ << e;
00017     }
00018     catch (std::exception e) {
00019       hasThrown_ = true;
00020       exception_ << e.what();
00021     }
00022     catch (...) {
00023       hasThrown_ = true;
00024       exception_ << "Unknown exception";
00025     }
00026   }

bool edm::ExceptionCollector::hasThrown (  )  const [inline]

Definition at line 33 of file ExceptionCollector.h.

References hasThrown_.

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

00033 {return hasThrown_;}

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

Definition at line 5 of file ExceptionCollector.cc.

References exception_.

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

00005                                     {
00006     throw exception_;
00007   }


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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:41:01 2009 for CMSSW by  doxygen 1.5.4