#ifndef XGS_HPP #define XGS_HPP // // $Id: XGS.hpp,v 1.4 2004/03/25 22:02:35 snyder Exp $ // // File: XGS.hpp // Purpose: Gather the geometry system exception definitions here. // Created: 27-APR-1999 // // $Revision: 1.4 $ // // // Include files #include #include // Global definitions namespace dgs { /** Exception classes for geometry_system Exceptions are: \begin{itemize} \item {\em XGSIllegalPoint} Thrown to indicate a point supposedly on a surface (or in a volume) is inconsistant with the boundaries. \end{itemize} */ class XGSIllegalPoint: public std::runtime_error { public: /// Exception thrown if a point is inconsistant with being on/in an element XGSIllegalPoint(const std::string& whose): // Static is dumb way to do initializaton forced by MS VC++ not recognizing // original, legal code. std::runtime_error(_mystring+whose) {} private: static std::string _mystring; }; class XGSIllegalStructure: public std::runtime_error { public: /// Exception thrown if a requested detector element is missing XGSIllegalStructure(const std::string& whose): // Static is dumb way to do initializaton forced by MS VC++ not recognizing // original, legal code. std::runtime_error(_mystring+whose) {} private: static std::string _mystring; }; class XGSIllegalDimension: public std::runtime_error { public: /// Exception thrown if a matrix has the wrong dimension XGSIllegalDimension(const std::string& whose): // Static is dumb way to do initializaton forced by MS VC++ not recognizing // original, legal code. std::runtime_error(_mystring+whose) {} private: static std::string _mystring; }; class XGSIllegalSize: public std::runtime_error { public: /// Exception thrown if a surface dimension is out-of-range XGSIllegalSize(const std::string& whose): // Static is dumb way to do initializaton forced by MS VC++ not recognizing // original, legal code. std::runtime_error(_mystring+whose) {} private: static std::string _mystring; }; } // namespace dgs #endif //XGS_HPP