1 #include <ClassNotFoundException.hpp>
\r
12 ClassNotFoundException::ClassNotFoundException()
\r
14 this->reason = (char*) calloc(strlen("Class not found : unknown") + 1, sizeof(char));
\r
15 strcpy(this->reason, "Class not found : unknown");
\r
19 ClassNotFoundException::ClassNotFoundException(const ClassNotFoundException& rClassNotFoundException)
\r
21 const char* reason = rClassNotFoundException.toString();
\r
22 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
23 strcpy(this->reason, reason);
\r
28 ClassNotFoundException::ClassNotFoundException(const char* name)
\r
30 this->reason = (char*) calloc(strlen("Class not found : ") + strlen(name) + 1, sizeof(char));
\r
31 sprintf(this->reason, "Class not found : %s", name);
\r
35 ClassNotFoundException::~ClassNotFoundException()
\r
41 const char* ClassNotFoundException::toString(void) const
\r
43 return (const char*)(this->reason);
\r
47 const ClassNotFoundException& ClassNotFoundException::operator = (const ClassNotFoundException& rClassNotFoundException)
\r
49 const char* reason = rClassNotFoundException.toString();
\r
50 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
57 }// namespace SimGrid
\r