Skip to content

Commit f68068b

Browse files
authored
[QC-759] Survive if ROOT fails to merge and report object name (#8465)
1 parent c715ddf commit f68068b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Utilities/Mergers/src/MergerAlgorithm.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void merge(TObject* const target, TObject* const other)
109109
auto targetTreeSize = estimateTreeSize(targetTree);
110110
auto otherTreeSize = estimateTreeSize(otherTree);
111111
if (auto totalSize = targetTreeSize + otherTreeSize; totalSize > 100000000) {
112-
LOG(warn) << "The tree '" << targetTree << "' would be larger than 100MB (" << totalSize << "B) after merging, skipping to let the system survive";
112+
LOG(warn) << "The tree '" << targetTree->GetName() << "' would be larger than 100MB (" << totalSize << "B) after merging, skipping to let the system survive";
113113
errorCode = 0;
114114
} else {
115115
errorCode = targetTree->Merge(&otherCollection);
@@ -119,10 +119,10 @@ void merge(TObject* const target, TObject* const other)
119119
} else if (target->InheritsFrom(TEfficiency::Class())) {
120120
errorCode = reinterpret_cast<TEfficiency*>(target)->Merge(&otherCollection);
121121
} else {
122-
LOG(warn) << "Object with type '" + std::string(target->ClassName()) + "' is not one of the mergeable types, skipping";
122+
LOG(warn) << "Object '" + std::string(target->GetName()) + "' with type '" + std::string(target->ClassName()) + "' is not one of the mergeable types, skipping";
123123
}
124124
if (errorCode == -1) {
125-
throw std::runtime_error("Merging object of type '" + std::string(target->ClassName()) + "' failed.");
125+
LOG(error) << "Merging object '" + std::string(target->GetName()) + "' of type '" + std::string(target->ClassName()) + "' failed.";
126126
}
127127
}
128128
}

0 commit comments

Comments
 (0)