Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Mag_MagExceptions_H
0002 #define Mag_MagExceptions_H
0003 
0004 #include <exception>
0005 #include <string>
0006 
0007 class MagException : public std::exception {
0008 public:
0009   MagException() throw() {}
0010   MagException(const char *message);
0011   ~MagException() throw() override;
0012   const char *what() const throw() override;
0013 
0014 private:
0015   std::string theMessage;
0016 };
0017 
0018 class MagGeometryError : public MagException {
0019 public:
0020   MagGeometryError() throw() {}
0021   MagGeometryError(const char *message) : MagException(message) {}
0022   ~MagGeometryError() throw() override {}
0023 };
0024 
0025 class MagLogicError : public MagException {
0026 public:
0027   MagLogicError() throw() {}
0028   MagLogicError(const char *message) : MagException(message) {}
0029   ~MagLogicError() throw() override {}
0030 };
0031 
0032 class GridInterpolator3DException : public std::exception {
0033 public:
0034   GridInterpolator3DException(double a1, double b1, double c1, double a2, double b2, double c2) throw();
0035   ~GridInterpolator3DException() throw() override;
0036   const char *what() const throw() override;
0037   double *limits(void) { return limits_; }
0038 
0039 protected:
0040   double limits_[6];
0041 };
0042 
0043 #endif