Skip to content

Commit

Permalink
improved error message on launch error
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Dec 12, 2023
1 parent fbd30fb commit 5e8f40a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src-tauri/src/app/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ async fn run_client(build_id: u32, account_data: MinecraftAccount, options: Laun
window_mutex.lock().unwrap().show().unwrap();
}

window_mutex.lock().unwrap().emit("client-error", format!("Failed to launch client: {:?}", e)).unwrap();
handle_stderr(&window_mutex, format!("Failed to launch client: {:?}", e).as_bytes()).unwrap();
let message = format!("An error with the client occourd:\n{:?}", e);
window_mutex.lock().unwrap().emit("client-error", format!("{}\n\nIf this error persists, upload your log with the button below and report it to GitHub.", message)).unwrap();
handle_stderr(&window_mutex, message.as_bytes()).unwrap();
};

*copy_of_runner_instance.lock().map_err(|e| format!("unable to lock runner instance: {:?}", e)).unwrap()
Expand Down

0 comments on commit 5e8f40a

Please sign in to comment.