Skip to content

Commit fbe89a9

Browse files
committed
HPCC-35956 Improve the error reporting when cannot read enough data
Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
1 parent d2364bd commit fbe89a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rtl/eclrtl/rtlcommon.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include "jiface.hpp"
66
#include "jfile.hpp"
7+
#include "jexcept.hpp"
78
#include "eclrtl.hpp"
89
#include "eclhelper.hpp"
910

@@ -134,7 +135,8 @@ class ECLRTL_API CThorContiguousRowBuffer : public CContiguousRowBuffer, impleme
134135
if (required > maxAvailable())
135136
{
136137
peekBytesDirect(required);
137-
assertex(required <= maxAvailable());
138+
if (unlikely(required > maxAvailable()))
139+
throw makeStringExceptionV(0, "Required %u bytes, but only %u available (row offset %u file offset %llu)", required, (unsigned)maxAvailable(), readOffset, tell() + readOffset);
138140
}
139141
}
140142

0 commit comments

Comments
 (0)