1 #include <ProcessNotFoundException.hpp>
\r
12 ProcessNotFoundException::ProcessNotFoundException()
\r
14 this->reason = (char*) calloc(strlen("Host not found : unknown") + 1, sizeof(char));
\r
15 strcpy(this->reason, "Host not found : unknown");
\r
19 ProcessNotFoundException::ProcessNotFoundException(const ProcessNotFoundException& rProcessNotFoundException)
\r
21 const char* reason = rProcessNotFoundException.toString();
\r
22 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
23 strcpy(this->reason, reason);
\r
28 ProcessNotFoundException::ProcessNotFoundException(int PID)
\r
31 _itoa(PID, buff, 10);
\r
32 this->reason = (char*) calloc(strlen("Process not found : ") + strlen(buff) + 1, sizeof(char));
\r
33 sprintf(this->reason, "Host not found : %s", buff);
\r
37 ProcessNotFoundException::~ProcessNotFoundException()
\r
43 const char* ProcessNotFoundException::toString(void) const
\r
45 return (const char*)(this->reason);
\r
49 const ProcessNotFoundException& ProcessNotFoundException::operator = (const ProcessNotFoundException& rProcessNotFoundException)
\r
51 const char* reason = rProcessNotFoundException.toString();
\r
52 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
59 }// namespace SimGrid
\r