1 #include <FileNotFoundException.hpp>
\r
14 FileNotFoundException::FileNotFoundException()
\r
16 this->reason = (char*) calloc(strlen("File not found") + 1, sizeof(char));
\r
17 strcpy(this->reason, "File not found");
\r
21 FileNotFoundException::FileNotFoundException(const FileNotFoundException& rFileNotFoundException)
\r
23 const char* reason = rFileNotFoundException.toString();
\r
24 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
25 strcpy(this->reason, reason);
\r
29 FileNotFoundException::FileNotFoundException(const char* file)
\r
31 this->reason = (char*) calloc(strlen("File not found ") + strlen(file) + 1, sizeof(char));
\r
32 sprintf(this->reason, "File not found %s", file);
\r
36 FileNotFoundException::~FileNotFoundException()
\r
42 const char* FileNotFoundException::toString(void) const
\r
44 return (const char*)(this->reason);
\r
48 const FileNotFoundException& FileNotFoundException::operator = (const FileNotFoundException& rFileNotFoundException)
\r
50 const char* reason = rFileNotFoundException.toString();
\r
51 this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
\r
58 }// namespace SimGrid
\r