From 8757cc7c4291420e94047ea54a735cbaa1eb6adb Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 27 Jul 2022 09:55:22 +0100 Subject: ipa: raspberryip: Remove all exception throw statements Replace all exception throw statements with LOG(RPi*, Fatal) error messages. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/ccm.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/ipa/raspberrypi/controller/rpi/ccm.cpp') diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp index 8095c42d..cf0c85d2 100644 --- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp +++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp @@ -45,11 +45,11 @@ void Matrix::read(boost::property_tree::ptree const ¶ms) int n = 0; for (auto it = params.begin(); it != params.end(); it++) { if (n++ == 9) - throw std::runtime_error("Ccm: too many values in CCM"); + LOG(RPiCcm, Fatal) << "Ccm: too many values in CCM"; *ptr++ = it->second.get_value(); } if (n < 9) - throw std::runtime_error("Ccm: too few values in CCM"); + LOG(RPiCcm, Fatal) << "Ccm: too few values in CCM"; } Ccm::Ccm(Controller *controller) @@ -70,12 +70,11 @@ void Ccm::read(boost::property_tree::ptree const ¶ms) ctCcm.ccm.read(p.second.get_child("ccm")); if (!config_.ccms.empty() && ctCcm.ct <= config_.ccms.back().ct) - throw std::runtime_error( - "Ccm: CCM not in increasing colour temperature order"); + LOG(RPiCcm, Fatal) << "Ccm: CCM not in increasing colour temperature order"; config_.ccms.push_back(std::move(ctCcm)); } if (config_.ccms.empty()) - throw std::runtime_error("Ccm: no CCMs specified"); + LOG(RPiCcm, Fatal) << "Ccm: no CCMs specified"; } void Ccm::setSaturation(double saturation) -- cgit v1.2.1