A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring of code and documentation.
[simgrid.git]
/
src
/
cxx
/
Environment.cxx
diff --git
a/src/cxx/Environment.cxx
b/src/cxx/Environment.cxx
index
5b0ea8d
..
a44fd2a
100644
(file)
--- a/
src/cxx/Environment.cxx
+++ b/
src/cxx/Environment.cxx
@@
-24,12
+24,12
@@
namespace SimGrid
}
\r
\r
Environment::Environment(const char* file)
\r
}
\r
\r
Environment::Environment(const char* file)
\r
- throw(InvalidArgumentException);
\r
+ throw(
NullPointerException,
InvalidArgumentException);
\r
{
\r
// check parameters
\r
\r
if(!file)
\r
{
\r
// check parameters
\r
\r
if(!file)
\r
- throw
InvalidParame
terException("file (must not be NULL");
\r
+ throw
NullPoin
terException("file (must not be NULL");
\r
\r
struct stat statBuf = {0};
\r
\r
\r
struct stat statBuf = {0};
\r
\r
@@
-65,7
+65,7
@@
namespace SimGrid
}
\r
\r
void Environment::load(const char* file)
\r
}
\r
\r
void Environment::load(const char* file)
\r
- throw(
InvalidArgument
Exception, LogicException)
\r
+ throw(
NullPointerException, FileNotFound
Exception, LogicException)
\r
{
\r
// check logic
\r
\r
{
\r
// check logic
\r
\r
@@
-75,12
+75,12
@@
namespace SimGrid
// check the parameters
\r
\r
if(!file)
\r
// check the parameters
\r
\r
if(!file)
\r
- throw
InvalidParameterException("file (must not be NULL
");
\r
+ throw
NullPointerException("file
");
\r
\r
struct stat statBuf = {0};
\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))
\r
\r
struct stat statBuf = {0};
\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))
\r
- throw
InvalidParameterException("file (file not found)"
);
\r
+ throw
FileNotFoundException(file
);
\r
\r
MSG_create_environment(file);
\r
\r
\r
MSG_create_environment(file);
\r
\r
@@
-95,7
+95,7
@@
namespace SimGrid
\r
// Getters/setters
\r
void Environment::setFile(const char* file)
\r
\r
// Getters/setters
\r
void Environment::setFile(const char* file)
\r
- throw(
InvalidArgument
Exception, LogicException)
\r
+ throw(
NullPointerException, FileNotFound
Exception, LogicException)
\r
{
\r
// check logic
\r
\r
{
\r
// check logic
\r
\r
@@
-105,12
+105,12
@@
namespace SimGrid
// check parameters
\r
\r
if(!file)
\r
// check parameters
\r
\r
if(!file)
\r
- throw
InvalidParame
terException("file (must not be NULL");
\r
+ throw
NullPoin
terException("file (must not be NULL");
\r
\r
struct stat statBuf = {0};
\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))
\r
\r
struct stat statBuf = {0};
\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))
\r
- throw
InvalidParameter
Exception("file (file not found)");
\r
+ throw
FileNotFound
Exception("file (file not found)");
\r
\r
this->file = file;
\r
}
\r
\r
this->file = file;
\r
}
\r