From e68509add7ac04f8d6b4b75fab6fa65f47c2a76c Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Thu, 4 May 2023 15:29:29 +0200 Subject: [PATCH] feat(launcher): Improve error message when download process fails. (#276) --- launcher/src/main.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/launcher/src/main.rs b/launcher/src/main.rs index 9f8d215b..867bfd3d 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -627,8 +627,21 @@ fn download_convert_model( return Err(LauncherError::DownloadError); } } - _ => { - tracing::error!("Download process exited with an unknown status."); + ExitStatus::Signaled(signal) => { + let mut err = String::new(); + download_process + .stderr + .take() + .unwrap() + .read_to_string(&mut err) + .unwrap(); + tracing::error!( + "Download process was signaled to shutdown with signal {signal}: {err}" + ); + return Err(LauncherError::DownloadError); + } + e => { + tracing::error!("Download process exited with an unknown status.: {e:?}"); return Err(LauncherError::DownloadError); } }