Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ApproxMVBB_Common_Exception_hpp
00011 #define ApproxMVBB_Common_Exception_hpp
00012
00013 #include <stdexcept>
00014 #include <exception>
00015 #include <string>
00016 #include <sstream>
00017
00018 namespace ApproxMVBB{
00019 class Exception : public std::runtime_error {
00020 public:
00021 Exception(const std::stringstream & ss): std::runtime_error(ss.str()){}
00022 private:
00023
00024 };
00025 }
00026
00027 #define ApproxMVBB_THROWEXCEPTION( message ) {std::stringstream ___s___ ; ___s___ << message << std::endl << " @ " << __FILE__ << " (" << __LINE__ << ")" << std::endl; throw ApproxMVBB::Exception(___s___);}
00028
00029
00030
00031 #endif // Exception_hpp