Muscle C/C++ API: exception.hpp Source File

exception.hpp

Go to the documentation of this file.
00001 #ifndef MUSCLE_EXCEPTION_HPP
00002 #define MUSCLE_EXCEPTION_HPP
00003 
00004 #include "logger.hpp"
00005 #include <exception>
00006
00007 namespace muscle {
00008
00009 class muscle_exception : std::exception {
00010
00011 public:
00012         muscle_exception (std::string msg) throw() {
00013                 desc = "MUSCLE exception: " + msg;
00014                 logger::severe(desc.c_str());
00015         };
00016         virtual const char* what() const throw() { return desc.c_str(); };
00017         virtual ~muscle_exception() throw() {};
00018 private:
00019         std::string desc;
00020 };
00021
00022 }
00023
00024 #endif

Generated on Thu Oct 18 14:28:28 2012 for Muscle C/C++ API by  doxygen 1.5.6