Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:24

0001 #ifndef DataFormats_FWLite_ErrorThrower_h
0002 #define DataFormats_FWLite_ErrorThrower_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWLite
0006 // Class  :     ErrorThrower
0007 //
0008 /**\class ErrorThrower ErrorThrower.h DataFormats/FWLite/interface/ErrorThrower.h
0009 
0010  Description: Allows delaying a throw of a specific exception
0011 
0012  Usage:
0013     Used internally by FWLite
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Tue Sep 23 09:58:07 EDT 2008
0019 //
0020 
0021 // system include files
0022 #include <typeinfo>
0023 
0024 // user include files
0025 
0026 // forward declarations
0027 namespace fwlite {
0028   class ErrorThrower {
0029   public:
0030     ErrorThrower();
0031     virtual ~ErrorThrower();
0032 
0033     // ---------- const member functions ---------------------
0034     virtual void throwIt() const = 0;
0035     virtual ErrorThrower* clone() const = 0;
0036 
0037     // ---------- static member functions --------------------
0038     static ErrorThrower* unsetErrorThrower();
0039     static ErrorThrower* errorThrowerBranchNotFoundException(const std::type_info&,
0040                                                              const char*,
0041                                                              const char*,
0042                                                              const char*);
0043     static ErrorThrower* errorThrowerProductNotFoundException(const std::type_info&,
0044                                                               const char*,
0045                                                               const char*,
0046                                                               const char*);
0047 
0048     // ---------- member functions ---------------------------
0049 
0050   private:
0051     //ErrorThrower(const ErrorThrower&); // stop default
0052 
0053     //const ErrorThrower& operator=(const ErrorThrower&); // stop default
0054 
0055     // ---------- member data --------------------------------
0056   };
0057 
0058 }  // namespace fwlite
0059 #endif