use eoExceptions everywhere
This commit is contained in:
parent
75ac37b02a
commit
eba2e14950
127 changed files with 524 additions and 418 deletions
|
|
@ -374,7 +374,7 @@ class Experiment : public eoserial::Persistent
|
|||
} else if( distribName == "exponential" ) {
|
||||
_distribution = & exponentialDistribution;
|
||||
} else {
|
||||
throw std::runtime_error("When unpacking experience, no distribution found.");
|
||||
throw eoException("When unpacking experience, no distribution found.");
|
||||
}
|
||||
|
||||
eoserial::unpackObject( *obj, "distribution", *_distribution );
|
||||
|
|
@ -503,7 +503,7 @@ int main( int argc, char** argv )
|
|||
{
|
||||
if( isChosenDistrib )
|
||||
{
|
||||
throw std::runtime_error("Only one distribution can be chosen during a launch!");
|
||||
throw eoException("Only one distribution can be chosen during a launch!");
|
||||
} else
|
||||
{
|
||||
isChosenDistrib = true;
|
||||
|
|
@ -517,7 +517,7 @@ int main( int argc, char** argv )
|
|||
|
||||
if( !isChosenDistrib )
|
||||
{
|
||||
throw std::runtime_error("No distribution chosen. One distribution should be chosen.");
|
||||
throw eoException("No distribution chosen. One distribution should be chosen.");
|
||||
}
|
||||
|
||||
Experiment e( pdistrib, size, packet_size, worker_print_waiting_time, seed, fileName );
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ int main(int argc, char** argv)
|
|||
// eo::log << eo::setlevel( eo::debug );
|
||||
Node::init( argc, argv );
|
||||
if( Node::comm().size() != 7 ) {
|
||||
throw std::runtime_error("World size should be 7.");
|
||||
throw eoException("World size should be 7.");
|
||||
}
|
||||
|
||||
SerializableVector< SerializableBase<int> > v;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ int main(int argc, char** argv)
|
|||
|
||||
const int ALL = Node::comm().size();
|
||||
if( ALL < 3 ) {
|
||||
throw std::runtime_error("Needs at least 3 processes to be launched!");
|
||||
throw eoException("Needs at least 3 processes to be launched!");
|
||||
}
|
||||
|
||||
// Tests are auto described thanks to member "description"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue