X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b1ec3c5445076d8f5827f850a9a5e9ea4853696..5d37103da397672aff379d7dc01186068bfc1498:/src/cxx/MsgException.cxx?ds=sidebyside diff --git a/src/cxx/MsgException.cxx b/src/cxx/MsgException.cxx deleted file mode 100644 index 5b9bd4645e..0000000000 --- a/src/cxx/MsgException.cxx +++ /dev/null @@ -1,61 +0,0 @@ -#include "MsgException.hpp" - -#include -#include -#include - -using namespace std; - -namespace SimGrid -{ - namespace Msg - { - - MsgException::MsgException() - { - this->reason = (char*) calloc(strlen("Internal exception : unknown reason") + 1, sizeof(char)); - strcpy(this->reason, "Internal exception : unknown reason"); - } - - - MsgException::MsgException(const MsgException& rMsgException) - { - const char* reason = rMsgException.toString(); - this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char)); - strcpy(this->reason, reason); - - } - - MsgException::MsgException(const char* reason) - { - this->reason = (char*) calloc(strlen("Internal exception : ") + strlen(reason) + 1, sizeof(char)); - sprintf(this->reason, "Invalid exception : %s", reason); - } - - - MsgException::~MsgException() - { - if(this->reason) - free(this->reason); - } - - const char* MsgException::toString(void) const - { - return (const char*)(this->reason); - } - - - const MsgException& MsgException::operator = (const MsgException& rMsgException) - { - const char* reason = rMsgException.toString(); - this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char)); - - return *this; - } - - } // namespace Msg - -}// namespace SimGrid - - -