diff --git a/k4FWCore/components/PodioOutput.cpp b/k4FWCore/components/PodioOutput.cpp index 3a343f12..0bf54842 100644 --- a/k4FWCore/components/PodioOutput.cpp +++ b/k4FWCore/components/PodioOutput.cpp @@ -59,8 +59,16 @@ StatusCode PodioOutput::execute() { } else { try { m_framewriter->writeFrame(frame, "events", m_collection_names_to_write); - } catch (std::runtime_error& e) { - error() << "Could not write event: " << e.what() << endmsg; + } catch (std::runtime_error&) { + const auto& [missing, _] = m_framewriter->checkConsistency(m_collection_names_to_write, "events"); + error() << "Could not write event, because the following collections are not present: "; + std::string sep = ""; + for (const auto& n : missing) { + error() << sep << n; + sep = ", "; + } + error() << endmsg; + return StatusCode::FAILURE; } }