-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for exit and use original error code so crash handler appears tr…
…ansparently
- Loading branch information
1 parent
eb42d35
commit f5b76ad
Showing
4 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] | ||
|
||
use shared::popup::fatal_popup; | ||
use std::process::ExitCode; | ||
|
||
fn main() { | ||
if let Err(e) = yabg3nml::autostart() { | ||
fatal_popup("autostart failure", e.to_string()); | ||
use shared::popup::{display_popup, MessageBoxIcon}; | ||
|
||
fn main() -> ExitCode { | ||
match yabg3nml::autostart() { | ||
Ok(c) => c, | ||
Err(e) => { | ||
display_popup("Autostart Failure", e.to_string(), MessageBoxIcon::Error); | ||
// DO NOT signal failure for the crash handler | ||
ExitCode::SUCCESS | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![feature(windows_process_exit_code_from)] | ||
|
||
mod autostart; | ||
mod cli; | ||
mod console; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[toolchain] | ||
channel = "1.82" | ||
channel = "nightly-2024-11-17" | ||
components = ["rustfmt", "clippy"] | ||
profile = "minimal" |