Giri's C++ Support Library
C++ library providing everything you need to quickly create awesome applications.
Exception.h
Go to the documentation of this file.
1 
10 #ifndef SUPPORTLIB_EXCEPTION_H
11 #define SUPPORTLIB_EXCEPTION_H
12 #include <exception>
13 #include <string>
14 #include "Object.h"
15 namespace giri {
47  class ExceptionBase : public Object<ExceptionBase>, public std::exception
48  {
49  public:
54  ExceptionBase(const std::string& msg = ""): m_Message(msg){};
55  const char * what () const throw () {
56  return m_Message.c_str();
57  }
62  std::string getMessage() const{
63  return m_Message;
64  }
69  void setMessage(const std::string & message = ""){
70  m_Message = message;
71  }
72  private:
73  std::string m_Message;
74  };
75 }
76 #endif // SUPPORTLIB_EXCEPTION_H
Base class of all classes.
Base exception to inherit custom exceptions from.
Definition: Exception.h:48
ExceptionBase(const std::string &msg="")
Definition: Exception.h:54
std::string getMessage() const
Definition: Exception.h:62
void setMessage(const std::string &message="")
Definition: Exception.h:69
Base Class of all classes.
Definition: Object.h:33
Namespace for giri's C++ support library.
Definition: Base64.h:47