Skip to content

Commit

Permalink
update error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
dromzeh committed Aug 27, 2023
1 parent 06e79e4 commit 1a3047f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extern crate winreg;
use std::error::Error;
use winreg::RegValue;
use std::result::Result;
use winreg::RegValue;
mod fps_settings;
mod game_selection;
mod message;
Expand Down Expand Up @@ -31,11 +31,11 @@ fn run_program() -> Result<(), Box<dyn Error>> {
let mut json_value = match raw_value::parse_raw_value(&raw_value) {
Ok(value) => value,
Err(_) => {
println!("Failed to parse value, attempting to clean value...");
println!("Failed to parse raw value, attempting to clean and parse again.");
match raw_value::parse_raw_value(&clean_raw_value(&raw_value)) {
Ok(value) => value,
Err(_) => {
return Err("Failed to parse raw value after cleaning".into());
return Err("Failed to parse raw value after attempting to clean. You might want to check the registry value manually. If you are sure the value is correct, please open a GitHub issue.".into());
}
}
}
Expand Down Expand Up @@ -66,4 +66,4 @@ fn clean_raw_value(raw_value: &RegValue) -> RegValue {
bytes: new_bytes,
vtype: raw_value.vtype.clone(),
}
}
}

0 comments on commit 1a3047f

Please sign in to comment.