Skip to content

Commit

Permalink
refine error message
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma committed Nov 28, 2024
1 parent 2cc9608 commit 732c5b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions velox/common/compression/Compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ Expected<std::unique_ptr<Codec>> Codec::create(
return folly::makeUnexpected(
Status::Invalid("Unrecognized codec '{}'", name));
}
return folly::makeUnexpected(
Status::Invalid("Support for codec '{}' not implemented.", name));
return folly::makeUnexpected(Status::Invalid(
"Support for codec '{}' is either not built or not implemented.",
name));
}

auto compressionLevel = codecOptions.compressionLevel;
Expand Down Expand Up @@ -166,7 +167,7 @@ Expected<std::unique_ptr<Codec>> Codec::create(

if (codec == nullptr) {
return folly::makeUnexpected(Status::Invalid(
"Support for codec '{}' not implemented.",
"Support for codec '{}' is either not built or not implemented.",
compressionKindToString(kind)));
}

Expand Down
2 changes: 1 addition & 1 deletion velox/common/compression/tests/CompressionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ TEST_P(CodecTest, specifyCompressionLevel) {
VELOX_ASSERT_THROW(
Codec::create(kind, kUseDefaultCompressionLevel),
"Support for codec '" + compressionKindToString(kind) +
"' not implemented.");
"' is either not built or not implemented.");
return;
}
auto codecDefault = Codec::create(kind).thenOrThrow(folly::identity);
Expand Down

0 comments on commit 732c5b0

Please sign in to comment.