title: Defining own exception class in C++
body: <p>I tried to figure out how to implement my own base class for C++ exceptions which allow adding an error specific text string. I see no possibility for the std::c++ exceptions to change the error text, even not in C++11: <a href="http://www.cplusplus.com/reference/exception/exception/" rel="nofollow">http://www.cplusplus.com/reference/exception/exception/</a>.
  I also want to derive more specific exceptions from my Exception-base class. I read a lot of articles but I am still unsure whether my following implementation covers all important aspects. </p>
  
  <pre><code>class Exception : public std::exception {      
      public:
          Exception(const char* message) : m(message) {
  
          }
  
          virtual ~Exception() throw() {
  
          }
  
          virtual const char* what() const throw() {
              return m.c_str();
          }
  
      protected:
          std::string m;
  
      private:
          Exception();
      };
  </code></pre>
  
  <p>Is this implementation fine?</p>