Skip to content
Snippets Groups Projects
Commit 0ee37e0b authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Better error handling

parent da6bac95
No related branches found
No related tags found
1 merge request!157Kfpackmanager
This commit is part of merge request !157. Comments created here will be created in the context of that merge request.
...@@ -710,20 +710,13 @@ void ProcessorMotion::computeProcessingStep() ...@@ -710,20 +710,13 @@ void ProcessorMotion::computeProcessingStep()
switch (step) switch (step)
{ {
case FIRST_TIME : case FIRST_TIME :
if (selectPack(incoming_ptr_))
processing_step_ = FIRST_TIME_WITH_PACK;
else // ! last && ! pack(incoming)
processing_step_ = FIRST_TIME_WITHOUT_PACK;
break;
case SECOND_TIME : case SECOND_TIME :
WOLF_WARN ("||*||");
if (selectPack(last_ptr_)) WOLF_INFO (" ... It seems you missed something!");
processing_step_ = SECOND_TIME_WITH_PACK; WOLF_INFO ("ProcessorMotion received data before being initialized.");
else WOLF_INFO ("Did you forget to issue a Problem::setPrior()?");
processing_step_ = SECOND_TIME_WITHOUT_PACK; WOLF_ERROR("ProcessorMotion received data before being initialized.");
break; throw std::runtime_error("ProcessorMotion received data before being initialized.");
case RUNNING : case RUNNING :
default : default :
...@@ -740,6 +733,7 @@ void ProcessorMotion::computeProcessingStep() ...@@ -740,6 +733,7 @@ void ProcessorMotion::computeProcessingStep()
WOLF_INFO(" - You issued a problem->setPrior() after all processors are installed ---> ", (getProblem()->priorIsSet() ? "OK" : "NOK")); WOLF_INFO(" - You issued a problem->setPrior() after all processors are installed ---> ", (getProblem()->priorIsSet() ? "OK" : "NOK"));
WOLF_INFO(" - You have configured all your processors with compatible time tolerances"); WOLF_INFO(" - You have configured all your processors with compatible time tolerances");
WOLF_ERROR("Pack's KF and last's KF have matching time stamps (i.e. below time tolerances)."); WOLF_ERROR("Pack's KF and last's KF have matching time stamps (i.e. below time tolerances).");
throw std::runtime_error("Pack's KF and last's KF have matching time stamps (i.e. below time tolerances).");
} }
processing_step_ = RUNNING_WITH_PACK; processing_step_ = RUNNING_WITH_PACK;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment