}\r
\r
Environment::Environment(const char* file)\r
- throw(InvalidArgumentException);\r
+ throw(NullPointerException, InvalidArgumentException);\r
{\r
// check parameters\r
\r
if(!file)\r
- throw InvalidParameterException("file (must not be NULL");\r
+ throw NullPointerException("file (must not be NULL");\r
\r
struct stat statBuf = {0};\r
\r
}\r
\r
void Environment::load(const char* file)\r
- throw(InvalidArgumentException, LogicException)\r
+ throw(NullPointerException, FileNotFoundException, LogicException)\r
{\r
// check logic\r
\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
- throw InvalidParameterException("file (file not found)");\r
+ throw FileNotFoundException(file);\r
\r
MSG_create_environment(file);\r
\r
\r
// Getters/setters\r
void Environment::setFile(const char* file)\r
- throw(InvalidArgumentException, LogicException)\r
+ throw(NullPointerException, FileNotFoundException, LogicException)\r
{\r
// check logic\r
\r
// check parameters\r
\r
if(!file)\r
- throw InvalidParameterException("file (must not be NULL");\r
+ throw NullPointerException("file (must not be NULL");\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 (file not found)");\r
\r
this->file = file;\r
}\r