Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sop committed Sep 17, 2019
1 parent 44f0a03 commit 55dec5f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ use error::*;
use std::env;
use std::ffi::{OsStr, OsString};
use std::path::PathBuf;
use win32::*;

fn main() {
if let Err(e) = run_app() {
error_message(&e.to_wide());
unsafe {
use winapi::um::winuser::*;
MessageBoxW(
std::ptr::null_mut(),
e.to_wide().as_ptr(),
wchar::wch_c!("Error").as_ptr(),
MB_OK | MB_ICONERROR | MB_SERVICE_NOTIFICATION,
);
}
}
}

Expand Down

0 comments on commit 55dec5f

Please sign in to comment.