diff --git a/FWCore/Utilities/interface/EDMException.h b/FWCore/Utilities/interface/EDMException.h index 9f8a7909a7c10..641df1d0f8b9b 100644 --- a/FWCore/Utilities/interface/EDMException.h +++ b/FWCore/Utilities/interface/EDMException.h @@ -66,6 +66,8 @@ namespace edm { ExceededResourceRSS = 8031, ExceededResourceTime = 8032, + EventGenerationFailure = 8501, + CaughtSignal = 9000 }; diff --git a/FWCore/Utilities/src/EDMException.cc b/FWCore/Utilities/src/EDMException.cc index 45b3b321062d5..00282d31920e6 100644 --- a/FWCore/Utilities/src/EDMException.cc +++ b/FWCore/Utilities/src/EDMException.cc @@ -42,6 +42,7 @@ namespace edm { EDM_MAP_ENTRY_NONS(trans_, ExceededResourceVSize); EDM_MAP_ENTRY_NONS(trans_, ExceededResourceRSS); EDM_MAP_ENTRY_NONS(trans_, ExceededResourceTime); + EDM_MAP_ENTRY_NONS(trans_, EventGenerationFailure); } } diff --git a/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc b/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc index c20f4ccd7ded6..cb91fa26554a7 100644 --- a/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc +++ b/GeneratorInterface/LHEInterface/plugins/ExternalLHEProducer.cc @@ -152,7 +152,7 @@ ExternalLHEProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { nextEvent(); if (!partonLevel) { - throw cms::Exception("ExternalLHEProducer") << "No lhe event found in ExternalLHEProducer::produce(). " + throw edm::Exception(edm::errors::EventGenerationFailure) << "No lhe event found in ExternalLHEProducer::produce(). " << "The likely cause is that the lhe file contains fewer events than were requested, which is possible " << "in case of phase space integration or uneweighting efficiency problems."; } @@ -296,7 +296,7 @@ ExternalLHEProducer::endRunProduce(edm::Run& run, edm::EventSetup const& es) nextEvent(); if (partonLevel) { - throw cms::Exception("ExternalLHEProducer") << "Error in ExternalLHEProducer::endRunProduce(). " + throw edm::Exception(edm::errors::EventGenerationFailure) << "Error in ExternalLHEProducer::endRunProduce(). " << "Event loop is over, but there are still lhe events to process." << "This could happen if lhe file contains more events than requested. This is never expected to happen."; }