Commit 65c99837 authored by in13's avatar in13

Add exception catch

parent 0c8c33c0
......@@ -109,14 +109,18 @@ void InelasticCount::postConfiguration() {
energyMode.setEnumeratedLabels(modes);
// Init count
calculate();
try {
calculate();
}
catch(CannotSetValue& e) {
}
}
/*
* calculate
*/
void InelasticCount::calculate() {
void InelasticCount::calculate() throw (CannotSetValue) {
float64 minute = 0;
if (energyMode() == IN13Spectrometer::TEMPERATURE_MODE) {
// DeltaE slope in �eV/min
......@@ -235,6 +239,7 @@ void InelasticCount::start() {
calculate();
} catch (CannotSetValue&) {
// Pb bad parameters can't start
log(Level::s_Error) << "Bad parameters, can't starting" << endlog;
commandProgression = 100;
return;
}
......
......@@ -125,7 +125,7 @@ private:
/*!
* \brief Calculate delta energy slope or step time
*/
void calculate();
void calculate() throw (CannotSetValue);
/*!
* \brief Calculate the actual temp channel
......
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