diff --git a/integrationTests/test-integrationDectector.cpp b/integrationTests/test-integrationDectector.cpp index 7d8f9ae8e..e750ffd7b 100755 --- a/integrationTests/test-integrationDectector.cpp +++ b/integrationTests/test-integrationDectector.cpp @@ -313,14 +313,14 @@ TEST_CASE( CHECK(m.getRateCorrection() == ratecorr); // ratecorr fail with dr 4 or 8 - CHECK_THROWS_AS(m.setDynamicRange(8), sls::NonCriticalError); + CHECK_THROWS_AS(m.setDynamicRange(8), sls::RuntimeError); CHECK(m.getRateCorrection() == 0); m.setDynamicRange(16); m.setDynamicRange(16); m.setRateCorrection(ratecorr); m.setDynamicRange(16); m.setRateCorrection(ratecorr); - CHECK_THROWS_AS(m.setDynamicRange(4), sls::NonCriticalError); + CHECK_THROWS_AS(m.setDynamicRange(4), sls::RuntimeError); CHECK(m.getRateCorrection() == 0); } @@ -360,11 +360,11 @@ TEST_CASE("Chiptestboard Loading Patterns", "[.ctbintegration]") { m.setPatternWord(addr, word); CHECK(m.setPatternWord(addr, -1) == word); addr = MAX_ADDR; - CHECK_THROWS_AS(m.setPatternWord(addr, word), sls::NonCriticalError); + CHECK_THROWS_AS(m.setPatternWord(addr, word), sls::RuntimeError); CHECK_THROWS_WITH(m.setPatternWord(addr, word), Catch::Matchers::Contains("be between 0 and")); addr = -1; - CHECK_THROWS_AS(m.setPatternWord(addr, word), sls::NonCriticalError); + CHECK_THROWS_AS(m.setPatternWord(addr, word), sls::RuntimeError); CHECK_THROWS_WITH(m.setPatternWord(addr, word), Catch::Matchers::Contains("be between 0 and")); diff --git a/slsDetectorSoftware/src/slsDetector.cpp b/slsDetectorSoftware/src/slsDetector.cpp index 454decbc1..a8f5afbfc 100755 --- a/slsDetectorSoftware/src/slsDetector.cpp +++ b/slsDetectorSoftware/src/slsDetector.cpp @@ -3188,7 +3188,7 @@ void slsDetector::updateRateCorrection() { break; default: setRateCorrection(0); - throw sls::NonCriticalError( + throw sls::RuntimeError( "Rate correction Deactivated, must be in 32 or 16 bit mode"); } } diff --git a/slsSupportLib/include/sls_detector_exceptions.h b/slsSupportLib/include/sls_detector_exceptions.h index 5bc115453..52c2adc01 100755 --- a/slsSupportLib/include/sls_detector_exceptions.h +++ b/slsSupportLib/include/sls_detector_exceptions.h @@ -27,49 +27,39 @@ public: } }; -struct CriticalError : public RuntimeError { +struct SharedMemoryError : public RuntimeError { public: - CriticalError(std::string msg):RuntimeError(msg) {} + SharedMemoryError(std::string msg):RuntimeError(msg) {} }; -struct SharedMemoryError : public CriticalError { +struct SocketError : public RuntimeError { public: - SharedMemoryError(std::string msg):CriticalError(msg) {} + SocketError(std::string msg):RuntimeError(msg) {} }; -struct SocketError : public CriticalError { +struct ZmqSocketError : public RuntimeError { public: - SocketError(std::string msg):CriticalError(msg) {} + ZmqSocketError(std::string msg):RuntimeError(msg) {} }; -struct ZmqSocketError : public CriticalError { +struct NotImplementedError : public RuntimeError { public: - ZmqSocketError(std::string msg):CriticalError(msg) {} + NotImplementedError(std::string msg):RuntimeError(msg) {} }; -struct NonCriticalError : public RuntimeError { +struct DetectorError : public RuntimeError { public: - NonCriticalError(std::string msg):RuntimeError(msg) {} + DetectorError(std::string msg):RuntimeError(msg) {} }; -struct NotImplementedError : public NonCriticalError { +struct ReceiverError : public RuntimeError { public: - NotImplementedError(std::string msg):NonCriticalError(msg) {} + ReceiverError(std::string msg):RuntimeError(msg) {} }; -struct DetectorError : public NonCriticalError { +struct GuiError : public RuntimeError { public: - DetectorError(std::string msg):NonCriticalError(msg) {} -}; - -struct ReceiverError : public NonCriticalError { -public: - ReceiverError(std::string msg):NonCriticalError(msg) {} -}; - -struct GuiError : public NonCriticalError { -public: - GuiError(std::string msg):NonCriticalError(msg) {} + GuiError(std::string msg):RuntimeError(msg) {} }; }