#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_ |
Definition at line 29 of file ExceptionCollector.h.
edm::ExceptionCollector::ExceptionCollector | ( | ) | [inline] |
Definition at line 31 of file ExceptionCollector.h.
: exception_(std::string()), hasThrown_(false) {}
edm::ExceptionCollector::~ExceptionCollector | ( | ) | [inline] |
Definition at line 32 of file ExceptionCollector.h.
{}
void edm::ExceptionCollector::call | ( | boost::function< void(void)> | f | ) |
Definition at line 10 of file ExceptionCollector.cc.
References exception, exception_, f, hasThrown_, and cms::Exception::what().
Referenced by edm::EventProcessor::endJob().
{ try { f(); } catch (cms::Exception const& e) { hasThrown_ = true; exception_ << e; } catch (std::exception const& e) { hasThrown_ = true; exception_ << e.what(); } catch (...) { hasThrown_ = true; exception_ << "Unknown exception"; } }
bool edm::ExceptionCollector::hasThrown | ( | ) | const [inline] |
Definition at line 33 of file ExceptionCollector.h.
References hasThrown_.
Referenced by edm::EventProcessor::endJob().
{return hasThrown_;}
void edm::ExceptionCollector::rethrow | ( | void | ) | const |
Definition at line 5 of file ExceptionCollector.cc.
References exception_.
Referenced by edm::EventProcessor::endJob().
{ throw exception_; }
Definition at line 38 of file ExceptionCollector.h.
bool edm::ExceptionCollector::hasThrown_ [private] |
Definition at line 39 of file ExceptionCollector.h.
Referenced by call(), and hasThrown().