diff --git a/tree/dataframe/src/RLoopManager.cxx b/tree/dataframe/src/RLoopManager.cxx index 57c931a13bb856d6c5f2c76103c00903a7041513..fbd16393075d8fcbef7dd528389c888e10cf6e6a 100644 --- a/tree/dataframe/src/RLoopManager.cxx +++ b/tree/dataframe/src/RLoopManager.cxx @@ -342,6 +342,11 @@ void RLoopManager::RunTreeReader() std::cerr << "RDataFrame::Run: event was loop interrupted\n"; throw; } + if (r.GetEntryStatus() != TTreeReader::kEntryNotFound && fNStopsReceived < fNChildren) { + // something went wrong in the TTreeReader event loop + throw std::runtime_error("An error was encountered while processing the data. TTreeReader status code is: " + + std::to_string(r.GetEntryStatus())); + } CleanUpTask(0u); }