CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/Utilities/src/ExceptionCollector.cc

Go to the documentation of this file.
00001 #include "FWCore/Utilities/interface/ExceptionCollector.h"
00002 
00003 namespace edm {
00004   void
00005   ExceptionCollector::rethrow() const {
00006     throw exception_;
00007   }
00008 
00009   void
00010   ExceptionCollector::call(boost::function<void(void)> f) {
00011     try {
00012       f();
00013     }
00014     catch (cms::Exception const& e) {
00015       hasThrown_ = true;
00016       exception_ << e;
00017     }
00018     catch (std::exception const& e) {
00019       hasThrown_ = true;
00020       exception_ << e.what();
00021     }
00022     catch (...) {
00023       hasThrown_ = true;
00024       exception_ << "Unknown exception";
00025     }
00026   }
00027 }