diff --git a/Validation/EventGenerator/src/HepMCValidationHelper.cc b/Validation/EventGenerator/src/HepMCValidationHelper.cc index f14f28d2af05e..cd69431ce3c13 100644 --- a/Validation/EventGenerator/src/HepMCValidationHelper.cc +++ b/Validation/EventGenerator/src/HepMCValidationHelper.cc @@ -1,6 +1,7 @@ #include "Validation/EventGenerator/interface/HepMCValidationHelper.h" #include "DataFormats/Math/interface/deltaR.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Utilities/interface/Exception.h" #include #include #include "TLorentzVector.h" @@ -202,8 +203,9 @@ namespace HepMCValidationHelper { std::vector taudaughters; findDescendents(taus[i], taudaughters); if (taudaughters.empty()) { - edm::LogError("HepMCValidationHelper") << "Tau with no daughters. This is a bug. Fix it"; - abort(); + throw cms::Exception("NoTauDaugters") + << " HepMCValidationHelper found no daughters for Tau within index " << i << " and info \n" + << *taus[i] << "\n This should not be able to happen and needs to be fixed."; } const HepMC::FourVector& taumom = taus[i]->momentum(); //remove the daughters from the list of particles to compute isolation