CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #ifndef FWCore_Utilities_ExceptionCollector_h
00002 #define FWCore_Utilities_ExceptionCollector_h
00003 
00024 #include "FWCore/Utilities/interface/Exception.h"
00025 #include <exception>
00026 #include "boost/function.hpp"
00027 
00028 namespace edm {
00029   class ExceptionCollector {
00030   public:
00031     ExceptionCollector() : exception_(std::string()), hasThrown_(false) {}
00032     ~ExceptionCollector() {}
00033     bool hasThrown() const {return hasThrown_;}
00034     void rethrow() const;
00035     void call(boost::function<void(void)>);
00036 
00037   private:
00038     cms::Exception exception_;
00039     bool hasThrown_;
00040   };
00041 }
00042 
00043 #endif