Skip to content

Commit 524fe1d

Browse files
committed
Change all instances of programming-error-induced error codes to ErrorCode_Failure
1 parent df41b22 commit 524fe1d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/core/src/clp/streaming_compression/lzma/Compressor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ auto Compressor::open(FileWriter& file_writer) -> void {
2626
m_compressed_stream_block_buffer.size()
2727
))
2828
{
29-
throw OperationFailed(ErrorCode_NoMem, __FILENAME__, __LINE__);
29+
throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__);
3030
}
3131
m_compressed_stream_file_writer = &file_writer;
3232
m_uncompressed_stream_pos = 0;
@@ -38,7 +38,7 @@ auto Compressor::close() -> void {
3838
}
3939

4040
if (m_lzma_stream.avail_in() > 0) {
41-
throw OperationFailed(ErrorCode_Corrupt, __FILENAME__, __LINE__);
41+
throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__);
4242
}
4343

4444
flush_lzma(LZMA_FINISH);
@@ -153,7 +153,7 @@ auto Compressor::flush_stream_output_block_buffer() -> void {
153153
m_compressed_stream_block_buffer.size()
154154
))
155155
{
156-
throw OperationFailed(ErrorCode_NoMem, __FILENAME__, __LINE__);
156+
throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__);
157157
}
158158
}
159159

components/core/tests/test-StreamingCompression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace {
3535
constexpr string_view cCompressedFilePath{"test_streaming_compressed_file.bin"};
3636
constexpr size_t cBufferSize{128L * 1024 * 1024}; // 128MB
3737
constexpr auto cCompressionChunkSizes = std::to_array<size_t>(
38-
{0, // no-op
38+
{0,
3939
cBufferSize / 100,
4040
cBufferSize / 50,
4141
cBufferSize / 25,

0 commit comments

Comments
 (0)