Commit 6092e4c1 authored by Locatelli's avatar Locatelli
Browse files

Revue of configuration, phase 1

parent 339a7885
......@@ -305,7 +305,7 @@ void LssAutoConfig::updateCountStatusMessage() {
try {
m_count = dynamic_cast<acquisition::Count*>(InstrumentManager::getInstance()->getExperimentController(m_countSpy->countControllerName()));
}
catch (InstrumentManager::ControllerNotFound& e) {
catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << name << " missing controller " << m_countSpy->countControllerName() << endlog;
return;
}
......@@ -496,7 +496,7 @@ void LssAutoConfig::start() {
try {
m_count = dynamic_cast<acquisition::Count*>(InstrumentManager::getInstance()->getExperimentController(m_countSpy->countControllerName()));
}
catch (InstrumentManager::ControllerNotFound& e) {
catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << name << " missing controller " << m_countSpy->countControllerName() << endlog;
commandStatus.setError();
commandProgression = 100;
......
......@@ -404,7 +404,7 @@ bool RemoteLSSSimulation::initSimulate() {
return false;
}
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller " << m_countSpy->countControllerName() << " in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -656,7 +656,7 @@ void RemoteLSSSimulation::getData() {
axis::AxisController* det = dynamic_cast<axis::AxisController*>(InstrumentManager::getInstance()->getExperimentController("Det"));
//jsonWriter.Double(det->position());
jsonWriter.Double(8.0);
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller Det in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -672,7 +672,7 @@ void RemoteLSSSimulation::getData() {
try {
axis::AxisController* det1 = dynamic_cast<axis::AxisController*>(InstrumentManager::getInstance()->getExperimentController("Det1"));
jsonWriter.Double(det1->position());
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller Det1 in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -688,7 +688,7 @@ void RemoteLSSSimulation::getData() {
try {
axis::AxisController* det2 = dynamic_cast<axis::AxisController*>(InstrumentManager::getInstance()->getExperimentController("Det2"));
jsonWriter.Double(det2->position());
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller Det2 in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -704,7 +704,7 @@ void RemoteLSSSimulation::getData() {
// axis::AxisController* bx =
// dynamic_cast<axis::AxisController*>(InstrumentManager::getInstance()->getExperimentController("Bx"));
// jsonWriter.Double(bx->position());
// } catch (InstrumentManager::ControllerNotFound& e) {
// } catch (InstrumentManager::InstrumentManagerError& e) {
// log(Level::s_Error) << " missing controller Bx in this instrument" << endlog;
//// commandStatus.setError();
//// commandProgression = 100;
......@@ -719,7 +719,7 @@ void RemoteLSSSimulation::getData() {
// axis::AxisController* by =
// dynamic_cast<axis::AxisController*>(InstrumentManager::getInstance()->getExperimentController("By"));
// jsonWriter.Double(by->position());
// } catch (InstrumentManager::ControllerNotFound& e) {
// } catch (InstrumentManager::InstrumentManagerError& e) {
//// log(Level::s_Error) << " missing controller By in this instrument" << endlog;
//// commandStatus.setError();
//// commandProgression = 100;
......@@ -734,7 +734,7 @@ void RemoteLSSSimulation::getData() {
try {
stateio::AttenuatorController* attenuator = dynamic_cast<stateio::AttenuatorController*>(InstrumentManager::getInstance()->getExperimentController("Attenuator"));
jsonWriter.Double(attenuator->attenuationCoefficient());
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller Attenuator in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -754,7 +754,7 @@ void RemoteLSSSimulation::getData() {
jsonWriter.Double(1.0);
}
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller Attenuator in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -776,7 +776,7 @@ void RemoteLSSSimulation::getData() {
// return;
jsonWriter.Double(1.0);
}
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller Attenuator in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -1129,7 +1129,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det->detSum.update(sum);
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller MultiDetector2 in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -1152,7 +1152,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det->detSum.update(sum);
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller MultiDetector3 in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -1175,7 +1175,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det->detSum.update(sum);
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller MultiDetector4 in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......@@ -1198,7 +1198,7 @@ void RemoteLSSSimulation::simulate() {
}
}
det->detSum.update(sum);
} catch (InstrumentManager::ControllerNotFound& e) {
} catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " missing controller MultiDetector5 in this instrument" << endlog;
commandStatus.setError();
commandProgression = 100;
......
......@@ -653,7 +653,7 @@ void RemoteMcStas::updateData(const sim_result& result) {
try {
count = dynamic_cast<acquisition::Count*>(InstrumentManager::getInstance()->getExperimentController(m_countSpy->countControllerName()));
}
catch (InstrumentManager::ControllerNotFound& e) {
catch (InstrumentManager::InstrumentManagerError& e) {
log(Level::s_Error) << " Count controller is missing" << endlog;
return;
}
......
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