Skip to content

Commit 9f2b487

Browse files
authored
ITS: Tracker don't print expected exception
If we are catching the expected exception std::bad_alloc, the print is superfluous. Also the validation script explicitly regex checks the log for this string leading to jobs being failed although the reco was successful. If the exception is anything different, still print it.
1 parent e04d84f commit 9f2b487

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ void Tracker<nLayers>::clustersToTracks(const LogFunc& logger, const LogFunc& er
6666
LOGP(error, "Too much memory used during {} in iteration {} in ROF span {}-{} iVtx={}: {:.2f} GB. Current limit is {:.2f} GB, check the detector status and/or the selections.",
6767
StateNames[mCurState], iteration, iROFs, iROFs + mTrkParams[iteration].nROFsPerIterations, iVertex,
6868
(double)mTimeFrame->getArtefactsMemory() / GB, (double)mTrkParams[iteration].MaxMemory / GB);
69-
LOGP(error, "Exception: {}", err.what());
69+
if (typeid(err) != typeid(std::bad_alloc) { // only print if the exceptions is different from what is expected
70+
LOGP(error, "Exception: {}", err.what());
71+
}
7072
if (mTrkParams[iteration].DropTFUponFailure) {
7173
mMemoryPool->print();
7274
mTimeFrame->wipe();

0 commit comments

Comments
 (0)