Thomas hai 4 días
pai
achega
6d4dfaf4ad
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/scan/scan.rs

+ 3 - 2
src/scan/scan.rs

@@ -753,8 +753,9 @@ pub fn par_whole_scan(id: &str, time_point: &str, config: &Config) -> anyhow::Re
                 .with_context(|| format!("temp path is not valid UTF-8: {tmp_path:?}"))?;
                 .with_context(|| format!("temp path is not valid UTF-8: {tmp_path:?}"))?;
 
 
             {
             {
-                let mut writer = get_gz_writer(tmp_path_str, true)
-                    .with_context(|| format!("failed to open BGZF temp file: {tmp_path_str}"))?;
+                let mut writer = get_gz_writer(tmp_path_str, true).map_err(|e| {
+                    anyhow::anyhow!("failed to open BGZF temp file: {tmp_path_str}: {e:#}")
+                })?;
 
 
                 for bin in &bins {
                 for bin in &bins {
                     writeln!(writer, "{}", bin.to_tsv_row()).with_context(|| {
                     writeln!(writer, "{}", bin.to_tsv_row()).with_context(|| {