CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends

cms::Exception Class Reference

#include <Exception.h>

Inheritance diagram for cms::Exception:
Clustering1DException CMSexception cond::Exception DDException DetLayerException edm::CodedException< Code > edm::eventsetup::MakeDataException edm::eventsetup::NoDataExceptionBase edm::eventsetup::NoRecordException< T > edm::Exception edm::UnknownModuleException LinPtException MeasurementDetException ora::Exception popcon::Exception PropagationException RPCException StatisticsException StripClusterizerAlgorithm::InvalidChargeException TrajectoryStateException

List of all members.

Public Types

typedef std::string Category
typedef std::list< CategoryCategoryList

Public Member Functions

void append (Exception const &another)
void append (std::string const &more_information)
void append (char const *more_information)
std::string category () const
 Exception (Category const &category)
 Exception (Category const &category, std::string const &message)
 Exception (Exception const &other)
 Exception (Category const &category, std::string const &message, Exception const &another)
virtual std::string explainSelf () const
CategoryList const & history () const
void raise ()
std::string rootCause () const
virtual char const * what () const throw ()
virtual ~Exception () throw ()

Private Member Functions

virtual std::exceptionclone () const
virtual void rethrow ()

Private Attributes

CategoryList category_
std::ostringstream ost_
std::string what_

Friends

template<typename E , typename T >
detail::Desired< E,
detail::is_derived_or_same
< Exception, E >::value >
::type
operator<< (E &e, T const &stuff)
template<typename E >
detail::Desired< E,
detail::is_derived_or_same
< Exception, E >::value >
::type const & 
operator<< (E const &e, std::ios_base &(*f)(std::ios_base &))
template<typename E >
detail::Desired< E,
detail::is_derived_or_same
< Exception, E >::value >
::type
operator<< (E &e, std::ios_base &(*f)(std::ios_base &))
template<typename E >
detail::Desired< E,
detail::is_derived_or_same
< Exception, E >::value >
::type const & 
operator<< (E const &e, std::ostream &(*f)(std::ostream &))
template<typename E >
detail::Desired< E,
detail::is_derived_or_same
< Exception, E >::value >
::type
operator<< (E &e, std::ostream &(*f)(std::ostream &))
template<typename E , typename T >
detail::Desired< E,
detail::is_derived_or_same
< Exception, E >::value >
::type const & 
operator<< (E const &e, T const &stuff)

Detailed Description

Definition at line 104 of file Exception.h.


Member Typedef Documentation

typedef std::string cms::Exception::Category

Definition at line 106 of file Exception.h.

Definition at line 107 of file Exception.h.


Constructor & Destructor Documentation

Exception::Exception ( Category const &  category) [explicit]

Reimplemented in cond::Exception, and popcon::Exception.

Definition at line 6 of file Exception.cc.

Referenced by clone().

                                                 :
    std::exception(),
    ost_(),
    category_(1, aCategory),
    what_()
  {
  }
Exception::Exception ( Category const &  category,
std::string const &  message 
)

Reimplemented in ora::Exception.

Definition at line 14 of file Exception.cc.

References argparse::message, and ost_.

                                                 :
    std::exception(),
    ost_(),
    category_(1, aCategory),
    what_()
  {
    ost_ << message;
    if(!message.empty()) {
        unsigned sz = message.size()-1;
        if(message[sz]!='\n' && message[sz]!=' ') ost_ << " ";
    }
  }
Exception::Exception ( Category const &  category,
std::string const &  message,
Exception const &  another 
)

Definition at line 28 of file Exception.cc.

References append(), category(), category_, argparse::message, and ost_.

                                                 :
    std::exception(),
    ost_(),
    category_(1, aCategory),
    what_()
  {
    ost_ << message;
    // check for newline at end of message first
    if(!message.empty() && message[message.size()-1]!='\n')
      ost_ << "\n";
    category_.push_back(another.category());
    append(another);
  }
Exception::Exception ( Exception const &  other)

Definition at line 44 of file Exception.cc.

References ost_.

                                            :
    std::exception(),
    ost_(),
    category_(other.category_),
    what_(other.what_)
  {
    ost_ << other.ost_.str();
  }
Exception::~Exception ( ) throw () [virtual]

Reimplemented in cond::Exception, ora::Exception, popcon::Exception, and edm::Exception.

Definition at line 53 of file Exception.cc.

                                {
  }

Member Function Documentation

void Exception::append ( Exception const &  another)
void Exception::append ( std::string const &  more_information)

Definition at line 86 of file Exception.cc.

References ost_.

                                                          {
    ost_ << more_information;
  }
void Exception::append ( char const *  more_information)

Definition at line 90 of file Exception.cc.

References ost_.

                                                     {
    ost_ << more_information;
  }
std::string Exception::category ( ) const
std::exception * Exception::clone ( void  ) const [private, virtual]

Reimplemented in Fastexception, BaseGenexception, and Genexception.

Definition at line 102 of file Exception.cc.

References Exception().

                                       {
    return new Exception(*this);
  }
std::string Exception::explainSelf ( void  ) const [virtual]
Exception::CategoryList const & Exception::history ( ) const

Definition at line 70 of file Exception.cc.

References category_.

Referenced by cms::TrackListMerger::produce().

                                                        {
    return category_;
  }
void cms::Exception::raise ( ) [inline]
void Exception::rethrow ( void  ) [private, virtual]

Reimplemented in edm::Exception, Fastexception, BaseGenexception, and Genexception.

Definition at line 106 of file Exception.cc.

Referenced by raise().

                          {
    throw *this;
  }
std::string Exception::rootCause ( ) const
char const * Exception::what ( ) const throw () [virtual]

Reimplemented in CMSexception, Fastexception, and BaseGenexception.

Definition at line 97 of file Exception.cc.

References explainSelf(), and what_.

Referenced by AdaptiveVertexReconstructor::AdaptiveVertexReconstructor(), MeasurementTracker::addStripDet(), sistrip::SpyIdentifyRunsModule::analyze(), MultiTrackValidator::analyze(), SiPixelLorentzAngleDB::analyze(), MuonTrackValidator::analyze(), SiStripDetVOffFakeBuilder::analyze(), AlcaBeamMonitor::analyze(), L1CondDBPayloadWriter::analyze(), PrimaryVertexValidation::analyze(), SiStripSpyMonitorModule::analyze(), evf::FUEventProcessor::attachDqmToShm(), AlcaBeamMonitor::beginLuminosityBlock(), GeometricSearchTrackerBuilder::build(), MagGeoBuilderFromDDD::buildInterpolator(), LocalCacheFile::cache(), CSCSectorReceiverLUT::calcGlobalPhiME(), edm::ExceptionCollector::call(), edm::service::MessageServicePSetValidation::check(), FWBeamSpot::checkBeamSpot(), PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::Factory::create(), sistrip::RawToDigiUnpacker::createDigis(), sistrip::SpyUnpacker::createDigis(), evf::FUEventProcessor::detachDqmFromShm(), edm::EDLooperBase::doDuringLoop(), edm::Worker::doWork(), UncatchedException::dump(), FWModelChangeManager::endChanges(), edm::Schedule::endJob(), exceptionTranslation(), sistrip::RawToClustersLazyUnpacker::fill(), SiStripMonitorPedestals::fillCondDBMEs(), SiStripThresholdDQM::fillMEsForDet(), SiStripQualityDQM::fillMEsForDet(), SiStripPedestalsDQM::fillMEsForDet(), SiStripNoisesDQM::fillMEsForDet(), SiStripApvGainsDQM::fillMEsForDet(), SiStripLorentzAngleDQM::fillMEsForLayer(), SiStripQualityDQM::fillMEsForLayer(), SiStripApvGainsDQM::fillMEsForLayer(), SiStripThresholdDQM::fillMEsForLayer(), SiStripPedestalsDQM::fillMEsForLayer(), SiStripNoisesDQM::fillMEsForLayer(), NuclearVertexBuilder::FillVertexWithAdaptVtxFitter(), LaserAlignmentEventFilter::filter(), TrackerOfflineValidation::fitResiduals(), TrackerOfflineValidationSummary::fitResiduals(), edm::EventProcessor::forkProcess(), CSCSectorReceiverLUT::getGlobalEtaValue(), CSCSectorReceiverLUT::getGlobalPhiValue(), HcalO2OManager::getListOfPoolIovs(), HcalO2OManager::getListOfPoolTags(), SiStripConfigDb::handleException(), edm::Path::handleWorkerFailure(), edm::MessageLoggerQ::handshakedCommand(), stor::EventConsumerSelector::initialize(), stor::EventStreamSelector::initialize(), SiPixelGainCalibrationService::isDead(), SiPixelGainCalibrationOfflineService::isDead(), SiPixelGainCalibrationForHLTSimService::isDead(), SiPixelGainCalibrationOfflineSimService::isDead(), SiPixelGainCalibrationForHLTService::isDead(), SiPixelGainCalibrationOfflineSimService::isDeadColumn(), SiPixelGainCalibrationOfflineService::isDeadColumn(), SiPixelGainCalibrationForHLTSimService::isDeadColumn(), SiPixelGainCalibrationForHLTService::isDeadColumn(), SiPixelGainCalibrationOfflineService::isNoisy(), SiPixelGainCalibrationForHLTSimService::isNoisy(), SiPixelGainCalibrationForHLTService::isNoisy(), SiPixelGainCalibrationService::isNoisy(), SiPixelGainCalibrationOfflineSimService::isNoisy(), SiPixelGainCalibrationForHLTSimService::isNoisyColumn(), SiPixelGainCalibrationOfflineSimService::isNoisyColumn(), SiPixelGainCalibrationForHLTService::isNoisyColumn(), SiPixelGainCalibrationOfflineService::isNoisyColumn(), main(), cond::BasePayloadProxy::make(), evf::FUEventProcessor::microState(), tfwliteselectortest::ThingsTSelector::process(), tfwliteselectortest::ThingsWorker::process(), cond::XMLAuthenticationService::XMLAuthenticationService::processFile(), edm::Schedule::processOneOccurrence(), SoftElectronProducer::produce(), HcalRawToDigi::produce(), EcalDCCTB07UnpackingModule::produce(), sistrip::FEDEmulatorModule::produce(), CSCTFUnpacker::produce(), EcalDCCTBUnpackingModule::produce(), HcalDigiToRaw::produce(), sistrip::SpyEventSummaryProducer::produce(), CastorDigiToRaw::produce(), CastorRawToDigi::produce(), edm::EventProcessor::readAndProcessEvent(), RecoProducerFP420::RecoProducerFP420(), sistrip::FEDEmulator::retrieveNoises(), sistrip::FEDEmulator::retrievePedestals(), cond::Utilities::run(), KalmanAlignmentAlgorithm::run(), edm::service::MessageLoggerScribe::runCommand(), FWPathsPopup::scheduleReloadEvent(), SiStripPedestalsSubtractor::subtract_(), and DTCalibDBUtils::writeToDB().

                                            {
    what_ = explainSelf();
    return what_.c_str();
  }

Friends And Related Function Documentation

template<typename E , typename T >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& operator<< ( E &  e,
T const &  stuff 
) [friend]

Definition at line 228 of file Exception.h.

  {
    e.ost_ << stuff;
    return e;
  }
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& operator<< ( E const &  e,
std::ios_base &(*)(std::ios_base &)  f 
) [friend]

Definition at line 276 of file Exception.h.

  {
    E& ref = const_cast<E&>(e);
    f(ref.ost_);
    return e;
  }
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& operator<< ( E &  e,
std::ios_base &(*)(std::ios_base &)  f 
) [friend]

Definition at line 266 of file Exception.h.

  {
    f(e.ost_);
    return e;
  }
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& operator<< ( E const &  e,
std::ostream &(*)(std::ostream &)  f 
) [friend]

Definition at line 256 of file Exception.h.

  {
    E& ref = const_cast<E&>(e);
    f(ref.ost_);
    return e;
  }
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& operator<< ( E &  e,
std::ostream &(*)(std::ostream &)  f 
) [friend]

Definition at line 247 of file Exception.h.

  {
    f(e.ost_);
    return e;
  }
template<typename E , typename T >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& operator<< ( E const &  e,
T const &  stuff 
) [friend]

Definition at line 237 of file Exception.h.

  {
    E& ref = const_cast<E&>(e);
    ref.ost_ << stuff;
    return e;
  }

Member Data Documentation

Reimplemented in edm::CodedException< Code >, and edm::Exception.

Definition at line 210 of file Exception.h.

Referenced by category(), Exception(), history(), and rootCause().

std::ostringstream cms::Exception::ost_ [private]

Definition at line 209 of file Exception.h.

Referenced by append(), Exception(), and explainSelf().

std::string cms::Exception::what_ [mutable, private]

Definition at line 211 of file Exception.h.

Referenced by what().