From 7ebbe8e7b5944bae177b15f3276ba324ab98a878 Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Wed, 3 Jan 2024 08:32:55 +0000 Subject: [PATCH] HPCC-31054 Improve error message when file copy runs out of disk space Signed-off-by: Gavin Halliday --- system/jlib/jfile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/jlib/jfile.cpp b/system/jlib/jfile.cpp index cc87f6afd0e..d0496dc84df 100644 --- a/system/jlib/jfile.cpp +++ b/system/jlib/jfile.cpp @@ -3264,7 +3264,8 @@ void doCopyFile(IFile * target, IFile * source, size32_t buffersize, ICopyFilePr // try to delete partial copy StringBuffer s; s.append("copyFile target=").append(dest->queryFilename()).append(" source=").append(source->queryFilename()).appendf("; read/write failure (%d): ",e->errorCode()); - exc.setown(MakeStringException(e->errorCode(), "%s", s.str())); + e->errorMessage(s); + exc.setown(makeStringException(e->errorCode(), s.str())); e->Release(); EXCLOG(exc, "doCopyFile"); }