use eoExceptions everywhere
This commit is contained in:
parent
75ac37b02a
commit
eba2e14950
127 changed files with 524 additions and 418 deletions
|
|
@ -115,13 +115,13 @@ public:
|
|||
// Read the parameters
|
||||
if (s[0] != 'p') {
|
||||
string str = "nkLandscapesEval.load: -- p -- expected in [" + _fileName + "] at the begining." ;
|
||||
throw runtime_error(str);
|
||||
throw eoException(str);
|
||||
}
|
||||
|
||||
file >> s;
|
||||
if (s != "NKp") {
|
||||
string str = "nkpLandscapesEval.load: -- NKp -- expected in [" + _fileName + "] at the begining." ;
|
||||
throw runtime_error(str);
|
||||
throw eoException(str);
|
||||
}
|
||||
|
||||
// read parameters N, K and p
|
||||
|
|
@ -131,7 +131,7 @@ public:
|
|||
// read the links
|
||||
if (s[0] != 'p') {
|
||||
string str = "nkpLandscapesEval.load: -- p -- expected in [" + _fileName + "] after the parameters N, K, and p." ;
|
||||
throw runtime_error(str);
|
||||
throw eoException(str);
|
||||
}
|
||||
|
||||
file >> s;
|
||||
|
|
@ -139,13 +139,13 @@ public:
|
|||
loadLinks(file);
|
||||
} else {
|
||||
string str = "nkpLandscapesEval.load: -- links -- expected in [" + _fileName + "] after the parameters N, K, and q." ;
|
||||
throw runtime_error(str);
|
||||
throw eoException(str);
|
||||
}
|
||||
|
||||
// lecture des tables
|
||||
if (s[0] != 'p') {
|
||||
string str = "nkpLandscapesEval.load: -- p -- expected in [" + _fileName + "] after the links." ;
|
||||
throw runtime_error(str);
|
||||
throw eoException(str);
|
||||
}
|
||||
|
||||
file >> s;
|
||||
|
|
@ -154,13 +154,13 @@ public:
|
|||
loadTables(file);
|
||||
} else {
|
||||
string str = "nkpLandscapesEval.load: -- tables -- expected in [" + _fileName + "] after the links." ;
|
||||
throw runtime_error(str);
|
||||
throw eoException(str);
|
||||
}
|
||||
|
||||
file.close();
|
||||
} else {
|
||||
string str = "nkpLandscapesEval.load: Could not open file [" + _fileName + "]." ;
|
||||
throw runtime_error(str);
|
||||
// string str = "nkpLandscapesEval.load: Could not open file [" + _fileName + "]." ;
|
||||
throw eoFileError(_fileName);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue