Skip to content

Commit a6fc968

Browse files
committed
more error messages
1 parent 9652e92 commit a6fc968

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ci/citool/src/jobs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ impl JobDatabase {
8585
}
8686

8787
pub fn load_job_db(db: &str) -> anyhow::Result<JobDatabase> {
88-
let mut db: Value = serde_yaml::from_str(db)?;
88+
let mut db: Value = serde_yaml::from_str(db).context("failed to parse YAML content")?;
8989

9090
// We need to expand merge keys (<<), because serde_yaml can't deal with them
9191
// `apply_merge` only applies the merge once, so do it a few times to unwrap nested merges.
92-
db.apply_merge()?;
93-
db.apply_merge()?;
92+
db.apply_merge().context("failed to apply merge keys")?;
93+
db.apply_merge().context("failed to apply merge keys")?;
9494

95-
let db: JobDatabase = serde_yaml::from_value(db)?;
95+
let db: JobDatabase = serde_yaml::from_value(db).context("failed to parse job database")?;
9696
Ok(db)
9797
}
9898

0 commit comments

Comments
 (0)