From 7cedb25ef7831583219598374a14a433e80a9564 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Wed, 18 Dec 2024 21:27:35 -0500 Subject: [PATCH] Adress coderabbit suggestions --- .../core/src/clp/streaming_compression/lzma/Compressor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/core/src/clp/streaming_compression/lzma/Compressor.cpp b/components/core/src/clp/streaming_compression/lzma/Compressor.cpp index 4a43e93e8..3e6bb0254 100644 --- a/components/core/src/clp/streaming_compression/lzma/Compressor.cpp +++ b/components/core/src/clp/streaming_compression/lzma/Compressor.cpp @@ -37,8 +37,9 @@ auto Compressor::close() -> void { } if (m_compression_stream.avail_in > 0) { - SPDLOG_ERROR("Tried to close LZMA compressor with unprocessed input data."); - throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__); + SPDLOG_WARN("Trying to close LZMA compressor with unprocessed input data. Processing and " + "flushing remaining data."); + flush_lzma(LZMA_FULL_FLUSH); } flush_lzma(LZMA_FINISH);