1 #include <FileNotFoundException.hpp>
\r
13 FileNotFoundException::FileNotFoundException()
\r
15 this->reason = (char*) calloc(strlen("File not found") + 1, sizeof(char));
\r
16 strcpy(this->reason, "File not found");
\r
20 FileNotFoundException::FileNotFoundException(const FileNotFoundException& rFileNotFoundException)
\r
22 const char* reason = rFileNotFoundException.toString();
\r
23 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
24 strcpy(this->reason, reason);
\r
28 FileNotFoundException::FileNotFoundException(const char* file)
\r
30 this->reason = (char*) calloc(strlen("File not found ") + strlen(file) + 1, sizeof(char));
\r
31 sprintf(this->reason, "File not found %s", file);
\r
35 FileNotFoundException::~FileNotFoundException()
\r
41 const char* FileNotFoundException::toString(void) const
\r
43 return (const char*)(this->reason);
\r
47 const FileNotFoundException& FileNotFoundException::operator = (const FileNotFoundException& rFileNotFoundException)
\r
49 const char* reason = rFileNotFoundException.toString();
\r
50 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
57 }// namespace SimGrid
\r