From c16b3e0c7b9da485b57f4144afef41c3905a0486 Mon Sep 17 00:00:00 2001 From: Marko Petric Date: Fri, 17 Apr 2020 18:06:37 +0200 Subject: [PATCH] fix catching polymorphic type --- src/FastJetProcessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FastJetProcessor.cpp b/src/FastJetProcessor.cpp index 5d2c7f5..15469b5 100644 --- a/src/FastJetProcessor.cpp +++ b/src/FastJetProcessor.cpp @@ -110,7 +110,7 @@ void FastJetProcessor::processEvent(LCEvent * evt) throw DataNotAvailableException("Collection is there, but its empty!"); } - } catch (DataNotAvailableException e) { + } catch (const DataNotAvailableException& e) { streamlog_out(WARNING) << e.what() << std::endl << "Skipping" << std::endl; //create dummy empty collection only in case there are processor that need the presence of them in later stages @@ -138,9 +138,9 @@ void FastJetProcessor::processEvent(LCEvent * evt) PseudoJetList jets; try { jets = _fju->clusterJets(pjList, particleIn); - } catch( SkippedFixedNrJetException& e ) { + } catch(const SkippedFixedNrJetException& e ) { _statsNrSkippedFixedNrJets++; - } catch( SkippedMaxIterationException& e ) { + } catch(const SkippedMaxIterationException& e ) { jets = e._jets; _statsNrSkippedMaxIterations++; }