From 51284e44a1b57f76bc1a6f74e01ff175d6421c1a Mon Sep 17 00:00:00 2001 From: Isaiah Norton Date: Thu, 18 Apr 2019 23:09:28 -0400 Subject: [PATCH] Include sizes in error for global write size mismatch --- tiledb/sm/query/writer.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tiledb/sm/query/writer.cc b/tiledb/sm/query/writer.cc index 486848e25e3..595fdd050a5 100644 --- a/tiledb/sm/query/writer.cc +++ b/tiledb/sm/query/writer.cc @@ -1033,10 +1033,14 @@ Status Writer::finalize_global_write_state() { if (cells_written != array_schema_->domain()->cell_num((T*)subarray_)) { storage_manager_->vfs()->remove_dir(meta->fragment_uri()); global_write_state_.reset(nullptr); - return LOG_STATUS(Status::WriterError( - "Failed to finalize global write state; Number " - "of cells written is different from the number of " - "cells expected for the query subarray")); + std::stringstream ss; + ss << "Failed to finalize global write state; Number " + << "of cells written (" + << cells_written + << ") is different from the number of cells expected (" + << array_schema_->domain()->cell_num((T*)subarray_) + << ") for the query subarray"; + return LOG_STATUS(Status::WriterError(ss.str())); } }