CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/DataFormats/GeometrySurface/interface/GeomExceptions.h

Go to the documentation of this file.
00001 #ifndef Geom_GeomExceptions_H
00002 #define Geom_GeomExceptions_H
00003 
00004 #include <exception>
00005 #include <string>
00006 
00007 class BaseGeomException : public std::exception {
00008 public:
00009   BaseGeomException() throw() {}
00010   BaseGeomException( const std::string& message) : theMessage(message) {}
00011   virtual ~BaseGeomException() throw() {}
00012   virtual const char* what() const throw() { return theMessage.c_str();}
00013 private:
00014   std::string theMessage;
00015 };
00016 
00017 class GeometryError : public BaseGeomException {
00018 public:
00019   GeometryError() throw() {}
00020   GeometryError( const std::string& message) : BaseGeomException(message) {}
00021   virtual ~GeometryError() throw() {}
00022 };
00023 
00024 #endif