diff --git a/multigrid/Cargo.toml b/multigrid/Cargo.toml index 2c014c4..c072120 100644 --- a/multigrid/Cargo.toml +++ b/multigrid/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" [dependencies] -sbp = { path = "../sbp", features = ["rayon", "serde1"] } +sbp = { path = "../sbp", features = ["rayon", "serde1", "fast-float"] } euler = { path = "../euler", features = ["serde1"] } hdf5 = "0.7.0" rayon = "1.3.0" @@ -14,5 +14,5 @@ indicatif = "0.15.0" structopt = "0.3.14" ndarray = { version = "0.13.1", features = ["serde"] } serde = { version = "1.0.115", features = ["derive"] } -json5 = "0.2.8" +json5 = "0.3.0" indexmap = { version = "1.5.2", features = ["serde-1"] } diff --git a/multigrid/src/main.rs b/multigrid/src/main.rs index e885bfb..cff42d9 100644 --- a/multigrid/src/main.rs +++ b/multigrid/src/main.rs @@ -197,7 +197,20 @@ fn main() { let opt = Options::from_args(); let filecontents = std::fs::read_to_string(&opt.json).unwrap(); - let config: parsing::Configuration = json5::from_str(&filecontents).unwrap(); + let config: parsing::Configuration = match json5::from_str(&filecontents) { + Ok(config) => config, + Err(e) => { + eprintln!("Configuration could not be read: {}", e); + if let json5::Error::Message { + location: Some(location), + .. + } = e + { + eprintln!("\t{:?}", location); + } + return; + } + }; let parsing::RuntimeConfiguration { names,