Skip to content

Commit 117c449

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 117c449

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rtl/eclrtl/rtlcommon.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ class ECLRTL_API CThorContiguousRowBuffer : public CContiguousRowBuffer, impleme
134134
if (required > maxAvailable())
135135
{
136136
peekBytesDirect(required);
137-
assertex(required <= maxAvailable());
137+
if (unlikely(required > maxAvailable()))
138+
throw makeStringExceptionV(0, "Required %u bytes, but only %u available (offset %u)", required, (unsigned)maxAvailable(), readOffset);
138139
}
139140
}
140141

0 commit comments

Comments
 (0)