Skip to content

Commit 92453a5

Browse files
committed
DPL: avoid hiding the actual issue
Simply print an error message and let the caller handle the actual error, so that we get more information about what went wrong.
1 parent fadee8b commit 92453a5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Framework/Core/src/DataAllocator.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ void DataAllocator::adopt(const Output& spec, LifetimeHolder<FragmentToBatch>& f
264264
// get rid of the intermediate tree 2 table object, saving memory.
265265
auto batch = source.finalize();
266266
if (!batch) {
267-
throw std::runtime_error("FragmentToBatch::finalize() returned null RecordBatch");
267+
// Do not throw here: this callback runs from ~LifetimeHolder which may
268+
// execute during stack unwinding (e.g. if fill() failed). Throwing during
269+
// unwinding calls std::terminate.
270+
LOG(error) << "FragmentToBatch::finalize() returned null RecordBatch, skipping serialization";
271+
return;
268272
}
269273
auto mock = std::make_shared<arrow::io::MockOutputStream>();
270274
int64_t expectedSize = 0;

0 commit comments

Comments
 (0)