Add launch crash detection with detailed error dialog, fix all warnings
This commit is contained in:
16
src/cli.rs
16
src/cli.rs
@@ -621,6 +621,14 @@ fn cmd_launch(db: &Database, path: &str) -> ExitCode {
|
||||
);
|
||||
ExitCode::SUCCESS
|
||||
}
|
||||
launcher::LaunchResult::Crashed { stderr, exit_code, .. } => {
|
||||
eprintln!(
|
||||
"App crashed immediately (exit code: {})\n{}",
|
||||
exit_code.map(|c| c.to_string()).unwrap_or_else(|| "unknown".into()),
|
||||
stderr,
|
||||
);
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
launcher::LaunchResult::Failed(msg) => {
|
||||
eprintln!("Error: {}", msg);
|
||||
ExitCode::FAILURE
|
||||
@@ -633,6 +641,14 @@ fn cmd_launch(db: &Database, path: &str) -> ExitCode {
|
||||
println!("Launched {} ({})", path, method.as_str());
|
||||
ExitCode::SUCCESS
|
||||
}
|
||||
launcher::LaunchResult::Crashed { stderr, exit_code, .. } => {
|
||||
eprintln!(
|
||||
"App crashed immediately (exit code: {})\n{}",
|
||||
exit_code.map(|c| c.to_string()).unwrap_or_else(|| "unknown".into()),
|
||||
stderr,
|
||||
);
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
launcher::LaunchResult::Failed(msg) => {
|
||||
eprintln!("Error: {}", msg);
|
||||
ExitCode::FAILURE
|
||||
|
||||
Reference in New Issue
Block a user