Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:22

0001 #ifndef NPSTAT_EXCEPTION_HH_
0002 #define NPSTAT_EXCEPTION_HH_
0003 
0004 /*!
0005 // \file NpstatException.h
0006 //
0007 // \brief Exceptions for the npstat namespace
0008 //
0009 // Author: I. Volobouev
0010 //
0011 // November 2012
0012 */
0013 
0014 #include <string>
0015 
0016 #include "FWCore/Utilities/interface/Exception.h"
0017 
0018 namespace npstat {
0019   /** Base class for the exceptions specific to the npstat namespace */
0020   struct NpstatException : public cms::Exception {
0021     inline NpstatException() : cms::Exception("npstat::NpstatException") {}
0022 
0023     inline explicit NpstatException(const std::string& description) : cms::Exception(description) {}
0024 
0025     inline explicit NpstatException(const char* description) : cms::Exception(description) {}
0026 
0027     ~NpstatException() throw() override {}
0028   };
0029 
0030   struct NpstatOutOfRange : public NpstatException {
0031     inline NpstatOutOfRange() : NpstatException("npstat::NpstatOutOfRange") {}
0032 
0033     inline explicit NpstatOutOfRange(const std::string& description) : NpstatException(description) {}
0034 
0035     ~NpstatOutOfRange() throw() override {}
0036   };
0037 
0038   struct NpstatInvalidArgument : public NpstatException {
0039     inline NpstatInvalidArgument() : NpstatException("npstat::NpstatInvalidArgument") {}
0040 
0041     inline explicit NpstatInvalidArgument(const std::string& description) : NpstatException(description) {}
0042 
0043     ~NpstatInvalidArgument() throw() override {}
0044   };
0045 
0046   struct NpstatRuntimeError : public NpstatException {
0047     inline NpstatRuntimeError() : NpstatException("npstat::NpstatRuntimeError") {}
0048 
0049     inline explicit NpstatRuntimeError(const std::string& description) : NpstatException(description) {}
0050 
0051     ~NpstatRuntimeError() throw() override {}
0052   };
0053 
0054   struct NpstatDomainError : public NpstatException {
0055     inline NpstatDomainError() : NpstatException("npstat::NpstatDomainError") {}
0056 
0057     inline explicit NpstatDomainError(const std::string& description) : NpstatException(description) {}
0058 
0059     ~NpstatDomainError() throw() override {}
0060   };
0061 }  // namespace npstat
0062 
0063 #endif  // NPSTAT_EXCEPTION_HH_