Add comment about used exception code

This commit is contained in:
Robert Schulze 2023-04-11 11:59:04 +00:00
parent bbbb55cd50
commit ba67626992
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -193,6 +193,9 @@ inline const char * readVarUInt(UInt64 & x, const char * istr, size_t size)
[[noreturn]] inline void throwValueTooLargeForVarIntEncodingException(UInt64 x)
{
/// Under practical circumstances, we should virtually never end up here but AST Fuzzer manages to create superlarge input integers
/// which trigger this exception. Intentionally not throwing LOGICAL_ERROR or calling abort() or [ch]assert(false), so AST Fuzzer
/// can swallow the exception and continue to run.
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Value {} is too large for VarInt encoding", x);
}