Skip to content

Commit

Permalink
Fill in remaining absl::Status messages (4/4).
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 644470473
  • Loading branch information
jwcullen committed Jun 18, 2024
1 parent e449dbd commit 762a6c2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion iamf/cli/cli_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ absl::Status GetCommonSampleRateAndBitDepth(
bool& requires_resampling) {
requires_resampling = false;
if (sample_rates.empty() || bit_depths.empty()) {
return absl::InvalidArgumentError("");
return absl::InvalidArgumentError(
"Expected at least one sample rate and bit depth.");
}

if (sample_rates.size() == 1) {
Expand Down
6 changes: 3 additions & 3 deletions iamf/cli/proto_to_obu/audio_element_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ absl::Status CollectDcgLabels(
coupled_substream_labels->push_back("Ltf4");
coupled_substream_labels->push_back("Rtf4");
} else {
LOG(ERROR) << "Unsupported number of height channels: "
<< accumulated_channels.height;
return InvalidArgumentError("");
return InvalidArgumentError(
absl::StrCat("Unsupported number of height channels: ",
accumulated_channels.height));
}
}

Expand Down
6 changes: 3 additions & 3 deletions iamf/cli/proto_to_obu/mix_presentation_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ absl::Status MixPresentationGenerator::CopyUserAnchoredLoudness(
obu_anchor_element = kAnchorElementAlbum;
break;
default:
LOG(ERROR) << "Unknown anchor_element: "
<< metadata_anchor_element.anchor_element();
return absl::InvalidArgumentError("");
return absl::InvalidArgumentError(
absl::StrCat("Unknown anchor_element= ",
metadata_anchor_element.anchor_element()));
}

int16_t obu_anchored_loudness;
Expand Down
5 changes: 2 additions & 3 deletions iamf/obu/param_definitions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ absl::Status ParamDefinition::Validate() const {

absl::Status status = absl::OkStatus();
if (parameter_rate_ == 0) {
LOG(ERROR) << "Parameter rate should not be zero. Parameter ID= "
<< parameter_id;
status = absl::InvalidArgumentError("");
status = absl::InvalidArgumentError(absl::StrCat(
"Parameter rate should not be zero. Parameter ID= ", parameter_id));
}

// Fields below are conditional on `param_definition_mode == 1`. Otherwise
Expand Down

0 comments on commit 762a6c2

Please sign in to comment.