From c7d5099317d72f6d22b88e9378c9c4ab65a72f28 Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Thu, 24 Jun 2021 16:31:24 -0700 Subject: [PATCH] #1469: util: improve error messages from Brotli --- src/vt/utils/compress/decompressor.impl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vt/utils/compress/decompressor.impl.h b/src/vt/utils/compress/decompressor.impl.h index b594098ebc..ed4829b93f 100644 --- a/src/vt/utils/compress/decompressor.impl.h +++ b/src/vt/utils/compress/decompressor.impl.h @@ -108,10 +108,10 @@ std::size_t Decompressor::read( case BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: { // We need to read more to continue decoding - vtAssert(avail_in_ == 0, "Should not have more input if we need more"); + vtAssert(avail_in_ == 0, "Brotli asked for more input even though we still had some."); bool const has_more_input = getMoreInput(); if (not has_more_input) { - vtAbort("Needs more input to decompress but the file terminated early"); + vtAbort("Brotli asked for more input but the file terminated early."); } break; } @@ -119,14 +119,14 @@ std::size_t Decompressor::read( { // this is an expected condition vtAssert( - avail_out == 0, "Available output should be 0 if we need more output" + avail_out == 0, "Brotli asked for more output even though we still had some." ); break; } case BROTLI_DECODER_RESULT_SUCCESS: { if (avail_in_ != 0 or getMoreInput()) { - vtAbort("Decompressor terminated early before reading the whole file!"); + vtAbort("Brotli terminated early before reading the whole file!"); } success = true; break;