1 #include <HostNotFoundException.hpp>
\r
12 HostNotFoundException::HostNotFoundException()
\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 HostNotFoundException::HostNotFoundException(const HostNotFoundException& rHostNotFoundException)
\r
21 const char* reason = rHostNotFoundException.toString();
\r
22 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
23 strcpy(this->reason, reason);
\r
28 HostNotFoundException::HostNotFoundException(const char* name)
\r
30 this->reason = (char*) calloc(strlen("Host not found : ") + strlen(name) + 1, sizeof(char));
\r
31 sprintf(this->reason, "Host not found : %s", name);
\r
35 HostNotFoundException::~HostNotFoundException()
\r
41 const char* HostNotFoundException::toString(void) const
\r
43 return (const char*)(this->reason);
\r
47 const HostNotFoundException& HostNotFoundException::operator = (const HostNotFoundException& rHostNotFoundException)
\r
49 const char* reason = rHostNotFoundException.toString();
\r
50 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
57 }// namespace SimGrid
\r