error logging for failed/retry download

This commit is contained in:
2024-09-18 16:09:45 +02:00
parent 252ac66234
commit 35ec579a06

View File

@@ -278,13 +278,17 @@ async fn update_dir(
) )
.await .await
{ {
println!( let file_name = file_path.clone().cute_path();
"Failed to download file {}, retry? (Y/n)", println_error!("{err}");
file_path.clone().display() println!("Failed to download file {file_name}, retry? (Y/n)");
);
let input = misc::stdin().to_ascii_lowercase(); let input = misc::stdin().to_ascii_lowercase();
if input == "n" { if input == "n" {
error!("Download for file {file_name} failed with {err}");
panic!("{err}"); panic!("{err}");
} else {
warn!(
"Download for file {file_name} failed with {err} user chose to retry download"
);
} }
}; };
download_complete = true; download_complete = true;