Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Some new files of the cxx version of the MSG API
[simgrid.git] / src / cxx / Exception.cxx
1 #include "Exception.hpp"\r
2 \r
3 namespace SimGrid\r
4 {\r
5         namespace Msg\r
6         {\r
7                 \r
8                         Exception::Exception()\r
9                         {\r
10                                 reason = "Unknown reason";\r
11                         }\r
12                 \r
13                 \r
14                         Exception::Exception(const Exception& rException)\r
15                         {\r
16                                 this->reason = rException.toString();\r
17                         }\r
18                 \r
19                 \r
20                         Exception::Exception(const char* reason)\r
21                         {\r
22                                 this->reason = reason;\r
23                         }\r
24                 \r
25                 \r
26                         Exception::~Exception()\r
27                         {\r
28                                 // NOTHING TODO\r
29                         }\r
30                                 \r
31                         const char* Exception::toString(void) const\r
32                         {\r
33                                 return this->reason;    \r
34                         }\r
35                 \r
36                 \r
37                         const Exception& Exception::operator = (const Exception& rException)\r
38                         {\r
39                                 this->reason = rException.toString();\r
40                                 return *this;\r
41                         }\r
42                 \r
43         } // namespace Msg      \r
44 \r
45 }// namespace SimGrid\r
46 \r
47 \r
48 \r