Commit 3b8312b4 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

Provide a more explicit message when dealing with exception from the SoT.

parent acba39aa
...@@ -935,11 +935,25 @@ void RCSotController::one_iteration() { ...@@ -935,11 +935,25 @@ void RCSotController::one_iteration() {
/// Generate a control law. /// Generate a control law.
try { try {
sotController_->nominalSetSensors(sensorsIn_); sotController_->nominalSetSensors(sensorsIn_);
} catch (std::exception &e) {
std::cerr << "Failure happened during one_iteration(): "
<< "when calling nominalSetSensors " << std::endl ;
std::cerr << __FILE__ << " " << __LINE__ << std::endl
<< e.what() << std::endl;
throw e;
}
try {
sotController_->getControl(controlValues_); sotController_->getControl(controlValues_);
} catch (std::exception &e) { } catch (std::exception &e) {
std::cerr << "Failure happened during one_iteration(): "
<< "when calling getControl " << std::endl;
std::cerr << __FILE__ << " " << __LINE__ << std::endl
<< e.what() << std::endl;;
throw e; throw e;
} }
/// Read the control values /// Read the control values
readControl(controlValues_); readControl(controlValues_);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment