Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

formula/exceptions.hh
Go to the documentation of this file.
00001 
00004 #ifndef formulaexceptions_hh
00005 #define formulaexceptions_hh
00006 
00007 #include "elementFormula.hh"
00008 #include "basics/exceptions.hh"
00009 
00010 namespace concepts {
00011 
00012 
00013   // ******************************************* ElementNotInDomainOfFormula **
00014 
00019   class ElementNotInDomainOfFormula : public ExceptionBase {
00020   public:
00022     template<typename F, typename G>
00023     ElementNotInDomainOfFormula(const Element<G>& elm, 
00024                                 const ElementFormula<F,G>& frm) {
00025       std::stringstream s;
00026       s << "element " << elm << " is not in the domain of " << frm;
00027       errorMessage_ = s.str();
00028     }
00029 
00030     template<typename F>
00031     ElementNotInDomainOfFormula(const Element<F>& elm) {
00032       std::stringstream s;
00033       s << "element " << elm << " is not in the domain";
00034       errorMessage_ = s.str();
00035     }
00036 
00037     virtual ~ElementNotInDomainOfFormula() throw() {}
00038   protected:
00039     virtual std::ostream& info(std::ostream& os) const throw();
00040   private:
00041     std::string errorMessage_;
00042   };
00043 
00044   // ******************************************* PointerToEmptyElementFormula **
00045 
00050   class PointerToEmptyElementFormula : public ExceptionBase {
00051   public:
00053     PointerToEmptyElementFormula()
00054     {
00055       errorMessage_ = "Empty RCP<ElementFormula>";
00056     }
00057     virtual ~PointerToEmptyElementFormula() throw() {}
00058   protected:
00059     virtual std::ostream& info(std::ostream& os) const throw();
00060   private:
00061     std::string errorMessage_;
00062   };
00063 
00064 
00065 } // namespace concepts
00066 
00067 #endif // formulaexceptions_hh
00068 

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)