Browse Source

Merge pull request #146 from RussWhitehead/82821

Bug: 82821 Improve dataset too large error message

Reviewed-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 14 years ago
parent
commit
44eba02358
1 changed files with 11 additions and 1 deletions
  1. 11 1
      ecl/hthor/hthor.cpp

+ 11 - 1
ecl/hthor/hthor.cpp

@@ -5675,7 +5675,17 @@ void CHThorWorkUnitWriteActivity::execute()
         }
         size32_t thisSize = inputMeta->getRecordSize(nextrec);
         if(outputLimit && ((rowdata.length() + thisSize) > outputLimit))
-            throw MakeStringException(0, "Dataset too large to output to workunit (limit %d megabytes)", outputLimit/0x100000);
+        {
+            StringBuffer errMsg("Dataset too large to output to workunit (limit "); 
+            errMsg.append(outputLimit/0x100000).append(") megabytes, in result ("); 
+            const char *name = helper.queryName();
+            if (name)
+                errMsg.append("name=").append(name);
+            else
+                errMsg.append("sequence=").append(helper.getSequence());
+            errMsg.append(")");
+            throw MakeStringException(0, "%s", errMsg.str());
+         }
         if (rowSerializer)
         {
             CThorDemoRowSerializer serializerTarget(rowdata);