jazz icon indicating copy to clipboard operation
jazz copied to clipboard

if parsing settings.toml fails, show that in an error

Open naturallymitchell opened this issue 5 years ago • 1 comments

with lua prelude instead of lua-prelude, got this: thread 'main' panicked at 'called Result::unwrap()on anErr value: expected an equals, found an identifier at line 1 in Settings.toml', libcore/result.rs:1009:5

naturallymitchell avatar Nov 07 '18 20:11 naturallymitchell

We could do something like

match settings.merge(config::File::with_name("Settings.toml")) {
     Ok(_) => {},
     Err(e) => {
          println!("Error opening Settings.toml: {}", e);
          return;
     }
};

Which wont throw a panic but would still display the error and would not continue the execution of the function

dariusc93 avatar Nov 07 '18 21:11 dariusc93