Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use pointers instead references.
[simgrid.git] / src / cxx / Environment.cxx
index 806e868..71e0acf 100644 (file)
   \r
 #include <Environment.hpp>\r
 \r
-#include <NullPointerException.hpp>\r
-#include <FileNotFoundException.hpp>\r
-#include <InvalidArgumentException.hpp>\r
-#include <LogicException.hpp>\r
-#include <MsgException.hpp>\r
-\r
 #include <stdlib.h>\r
 \r
 #include <sys/types.h>\r
@@ -49,7 +43,7 @@ namespace SimGrid
                }\r
                \r
                Environment::Environment(const char* file)\r
-               throw(NullPointerException, InvalidArgumentException)\r
+               throw(NullPointerException, FileNotFoundException)\r
                {\r
                        // check parameters\r
                        \r
@@ -59,7 +53,7 @@ namespace SimGrid
                        struct stat statBuf = {0};\r
                                \r
                        if(stat(file, &statBuf) < 0 || !S_ISREG(statBuf.st_mode))\r
-                               throw InvalidArgumentException("file (file not found)");\r
+                               throw FileNotFoundException("file (file not found)");\r
                                \r
                        this->file = file;\r
                        this->loaded = false;\r
@@ -161,4 +155,5 @@ namespace SimGrid
                }\r
                                \r
        } // namespace Msg\r
-} // namespace SimGrid
\ No newline at end of file
+} // namespace SimGrid\r
+\r