Skip to content

Commit

Permalink
write error to logs on tauri failure
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyrAhmady committed Jul 13, 2024
1 parent 3e3b31b commit 82b6477
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::process::exit;

use clap::Parser;
use injector::run_samp;
use log::LevelFilter;
use log::{error, LevelFilter};
use tauri::Manager;
use tauri::PhysicalSize;

Expand Down Expand Up @@ -110,7 +110,7 @@ async fn main() {
let _ = rt.block_on(rpcs::initialize_rpc());
});

tauri::Builder::default()
match tauri::Builder::default()
.plugin(tauri_plugin_upload::init())
.setup(|app| {
let main_window = app.get_window("main").unwrap();
Expand All @@ -127,5 +127,10 @@ async fn main() {
get_samp_favorite_list,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
{
Ok(_) => {}
Err(e) => {
error!("[main.rs] Running tauri instance failed: {}", e.to_string());
}
};
}

0 comments on commit 82b6477

Please sign in to comment.