GACEN  0.0.3
GacenException.h
Go to the documentation of this file.
1 
2 #ifndef GACENEXCEPTION_H
3 #define GACENEXCEPTION_H
4 
5 #include <iostream>
6 #include <sstream>
7 #include <exception>
8 
9 namespace gacen {
10  class GacenException : public std::exception
11  {
12  public:
13  GacenException( const char * Msg, int Line )
14  {
15  std::ostringstream oss;
16  oss << "Erreur ligne " << Line << " : "
17  << Msg;
18  this->msg = oss.str();
19  }
20 
21  virtual ~GacenException() throw()
22  {
23 
24  }
25 
26  virtual const char * what() const throw()
27  {
28  return this->msg.c_str();
29  }
30 
31  private:
32  std::string msg;
33  };
34 }
35 #endif // GACENEXCEPTION_H
Definition: GacenException.h:10
virtual const char * what() const
Definition: GacenException.h:26
Definition: Controller.h:11
GacenException(const char *Msg, int Line)
Definition: GacenException.h:13
virtual ~GacenException()
Definition: GacenException.h:21