Skip to content

Commit

Permalink
capitalize error messages
Browse files Browse the repository at this point in the history
[ci skip-build-wheels]
  • Loading branch information
Tom Dyas committed Oct 22, 2020
1 parent 33c38fc commit 9a1a2e2
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/rust/engine/process_execution/src/remote_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,19 @@ impl CommandRunner {
Component::Normal(name) => name
.to_str()
.ok_or_else(|| format!("unable to convert '{:?}' to string", name))?,
_ => return Err("illegal state: unexpected path component in relative path".into()),
_ => {
return Err(
"Illegal state: Found an unexpected path component in relative path.".into(),
)
}
};

// Load the Directory proto corresponding to `current_directory_digest`.
let current_directory = match store.load_directory(current_directory_digest).await? {
Some((dir, _)) => dir,
None => {
return Err(format!(
"illegal state: directory for digest {:?} did not exist locally",
"Illegal state: The directory for digest {:?} did not exist locally.",
&current_directory_digest
))
}
Expand All @@ -218,7 +222,7 @@ impl CommandRunner {
Some(dn) => dn,
None => {
return Err(format!(
"unable to find path component {:?} in directory",
"Unable to find path component {:?} in directory.",
next_name
))
}
Expand All @@ -236,7 +240,7 @@ impl CommandRunner {
Some((dir, _)) => dir,
None => {
return Err(format!(
"illegal state: directory for digest {:?} did not exist locally",
"Illegal state: The directory for digest {:?} did not exist locally.",
&current_directory_digest
))
}
Expand All @@ -249,7 +253,7 @@ impl CommandRunner {
.iter()
.find(|n| n.get_name() == file_base_name)
.cloned()
.ok_or_else(|| format!("file {:?} did not exist did not exist locally", file_path))
.ok_or_else(|| format!("File {:?} did not exist locally.", file_path))
}

async fn make_action_result(
Expand Down Expand Up @@ -425,7 +429,7 @@ impl crate::CommandRunner for CommandRunner {
}
}
Err(err) => {
log::warn!("failed to read from remote cache: {}", err);
log::warn!("Failed to read from remote cache: {}", err);
}
};
}
Expand All @@ -445,7 +449,7 @@ impl crate::CommandRunner for CommandRunner {
)
.await
{
log::warn!("failed to update remote cache: {}", err)
log::warn!("Failed to update remote cache: {}", err)
}
}

Expand Down

0 comments on commit 9a1a2e2

Please sign in to comment.