Skip to content

Commit

Permalink
Change all instances of programming-error-induced error codes to Erro…
Browse files Browse the repository at this point in the history
…rCode_Failure
  • Loading branch information
Bill-hbrhbr committed Dec 22, 2024
1 parent df41b22 commit 524fe1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ auto Compressor::open(FileWriter& file_writer) -> void {
m_compressed_stream_block_buffer.size()
))
{
throw OperationFailed(ErrorCode_NoMem, __FILENAME__, __LINE__);
throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__);
}
m_compressed_stream_file_writer = &file_writer;
m_uncompressed_stream_pos = 0;
Expand All @@ -38,7 +38,7 @@ auto Compressor::close() -> void {
}

if (m_lzma_stream.avail_in() > 0) {
throw OperationFailed(ErrorCode_Corrupt, __FILENAME__, __LINE__);
throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__);
}

flush_lzma(LZMA_FINISH);
Expand Down Expand Up @@ -153,7 +153,7 @@ auto Compressor::flush_stream_output_block_buffer() -> void {
m_compressed_stream_block_buffer.size()
))
{
throw OperationFailed(ErrorCode_NoMem, __FILENAME__, __LINE__);
throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__);
}
}

Expand Down
2 changes: 1 addition & 1 deletion components/core/tests/test-StreamingCompression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace {
constexpr string_view cCompressedFilePath{"test_streaming_compressed_file.bin"};
constexpr size_t cBufferSize{128L * 1024 * 1024}; // 128MB
constexpr auto cCompressionChunkSizes = std::to_array<size_t>(
{0, // no-op
{0,
cBufferSize / 100,
cBufferSize / 50,
cBufferSize / 25,
Expand Down

0 comments on commit 524fe1d

Please sign in to comment.