use eoExceptions everywhere
This commit is contained in:
parent
75ac37b02a
commit
eba2e14950
127 changed files with 524 additions and 418 deletions
|
|
@ -263,8 +263,8 @@ public:
|
|||
|
||||
|
||||
if (!os) {
|
||||
std::string str = "moVectorMonitor: Could not open " + _filename;
|
||||
throw std::runtime_error(str);
|
||||
// std::string str = "moVectorMonitor: Could not open " + _filename;
|
||||
throw eoFileError(_filename);;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < size(); i++) {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public:
|
|||
int pos = _is.tellg();
|
||||
_is >> fitness_str;
|
||||
if (fitness_str == "INVALID") {
|
||||
throw std::runtime_error("invalid fitness");
|
||||
throw eoInvalidFitnessError("invalid fitness");
|
||||
} else {
|
||||
Fitness repFit;
|
||||
_is.seekg(pos);
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ public:
|
|||
os.open(_filename.c_str(), std::ios::app);
|
||||
|
||||
if (!os) {
|
||||
std::string str = "moSampling: Could not open " + _filename;
|
||||
throw std::runtime_error(str);
|
||||
// std::string str = "moSampling: Could not open " + _filename;
|
||||
throw eoFileError(_filename);
|
||||
}
|
||||
|
||||
// set the precision of the output
|
||||
|
|
@ -199,7 +199,7 @@ public:
|
|||
void fileExport(unsigned int _col, std::string _filename, bool _openFile=false) {
|
||||
if (_col >= monitorVec.size()) {
|
||||
std::string str = "moSampling: Could not export into file the vector. The index does not exists (too large)";
|
||||
throw std::runtime_error(str);
|
||||
throw eoException(str);
|
||||
}
|
||||
|
||||
monitorVec[_col]->precision(precisionOutput);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue