Skip to content

Commit

Permalink
improved exit error dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Dec 12, 2023
1 parent 8c7b5d8 commit fbd30fb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src-tauri/src/app/webview.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::{sync::{Arc, Mutex}, time::Duration};
use serde::Deserialize;
use anyhow::{Result};
use anyhow::Result;
use tracing::{info, debug};
use tauri::{Manager};
use tauri::Manager;
use tokio::time::sleep;
use crate::{utils::download_file};
use crate::utils::download_file;

pub(crate) async fn download_client<F>(url: &str, on_progress: F, window: &Arc<Mutex<tauri::Window>>) -> Result<Vec<u8>> where F : Fn(u64, u64){
let app_handle = window.lock().unwrap().app_handle();
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use once_cell::sync::Lazy;
use anyhow::Result;
use directories::ProjectDirs;
use reqwest::Client;
use tracing::{debug};
use tracing::debug;
use tracing_subscriber::layer::SubscriberExt;

pub mod app;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/minecraft/java/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl JavaRuntime {

debug!("Process exited with code: {}", code);
if code != 0 && code != -1073740791 { // -1073740791 = happens when the process is killed forcefully, we don't want to bail in this case
bail!("Process exited with non-zero code: {}", code);
bail!("Process exited with non-zero exit code: {}.", code);
}
break;
},
Expand Down
7 changes: 5 additions & 2 deletions src/lib/main/MainScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,12 @@
});
listen("client-error", (e) => {
alert(e.payload);
const message = e.payload;
console.error(message);
clientLogShown = true;
console.error(e.payload);
alert(message);
});
function updateModStates() {
Expand Down

0 comments on commit fbd30fb

Please sign in to comment.