| 29 | } |
| 30 | |
| 31 | fn write_error(&mut self, name: &str, error: impl Debug + Display) { |
| 32 | tracing::error!(message_id = "dezX8SLf", ?error, "failed to archive {name:?}"); |
| 33 | if let Err(error) = self.zipper.write_file(format!("archive-error-{name}.txt"), error.to_string().as_bytes()) { |
| 34 | tracing::error!(message_id = "eWLYHIG7", ?error, "failed to archive error for {name:?}"); |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | fn add(&mut self, name: &str, f: impl FnOnce(&mut Zipper) -> anyhow::Result<()>) { |
| 39 | if let Err(error) = f(&mut self.zipper) { |