From 1b0f4af99cf68b71b1f51ddaba02e12920bf4bf4 Mon Sep 17 00:00:00 2001 From: francescobrivio Date: Tue, 12 Jul 2022 16:22:29 +0200 Subject: [PATCH] apply review comments on try/catch in Vx3DHLTAnalyzer.cc --- DQM/BeamMonitor/plugins/Vx3DHLTAnalyzer.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/DQM/BeamMonitor/plugins/Vx3DHLTAnalyzer.cc b/DQM/BeamMonitor/plugins/Vx3DHLTAnalyzer.cc index 466f9282e50dc..424c54e3874bd 100644 --- a/DQM/BeamMonitor/plugins/Vx3DHLTAnalyzer.cc +++ b/DQM/BeamMonitor/plugins/Vx3DHLTAnalyzer.cc @@ -343,8 +343,8 @@ int Vx3DHLTAnalyzer::MyFit(vector* vals) { try { Gauss3D->Minimize(); - } catch (...) { - edm::LogError("Vx3DHLTAnalyzer") << "\tInitial matrix not pos. def."; + } catch (cms::Exception& er) { + edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what(); } goodData = Gauss3D->Status(); edm = Gauss3D->Edm(); @@ -419,8 +419,8 @@ int Vx3DHLTAnalyzer::MyFit(vector* vals) { try { Gauss3D->Minimize(); - } catch (...) { - edm::LogError("Vx3DHLTAnalyzer") << "\tInitial matrix not pos. def."; + } catch (cms::Exception& er) { + edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what(); } goodData = Gauss3D->Status(); edm = Gauss3D->Edm(); @@ -496,8 +496,8 @@ int Vx3DHLTAnalyzer::MyFit(vector* vals) { try { Gauss3D->Minimize(); - } catch (...) { - edm::LogError("Vx3DHLTAnalyzer") << "\tInitial matrix not pos. def."; + } catch (cms::Exception& er) { + edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what(); } goodData = Gauss3D->Status(); edm = Gauss3D->Edm(); @@ -564,8 +564,8 @@ int Vx3DHLTAnalyzer::MyFit(vector* vals) { try { Gauss3D->Minimize(); - } catch (...) { - edm::LogError("Vx3DHLTAnalyzer") << "\tInitial matrix not pos. def."; + } catch (cms::Exception& er) { + edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what(); } goodData = Gauss3D->Status(); edm = Gauss3D->Edm(); @@ -636,8 +636,8 @@ int Vx3DHLTAnalyzer::MyFit(vector* vals) { try { Gauss3D->Minimize(); - } catch (...) { - edm::LogError("Vx3DHLTAnalyzer") << "\tInitial matrix not pos. def."; + } catch (cms::Exception& er) { + edm::LogError("Vx3DHLTAnalyzer") << "\tCaught Minuit2 exception: " << er.what(); } goodData = Gauss3D->Status(); edm = Gauss3D->Edm();