diff --git a/src/errorfr/mod.rs b/src/errorfr/mod.rs index 1194508..e03f521 100644 --- a/src/errorfr/mod.rs +++ b/src/errorfr/mod.rs @@ -8,9 +8,9 @@ pub enum Errorfr { ItemJsonMissing, /// item config json is corrupt - #[error("Error 2: item config json is corrupt, Reread config.md" + #[error("Error 2: item config json is corrupt, Reread config.md\n{:?}" )] - ItemJsonCorrupt, + ItemJsonCorrupt(serde_json::Error), /// idmap is missing #[error("Error 3: id_keys.json is missing")] diff --git a/src/main.rs b/src/main.rs index 00f3228..72e61fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,7 @@ fn cook() -> Result<(), Errorfr> { configpath = configpathargs; } - // newest json reading code + // load configs let json_config: Jsonconfig = serde_json::from_reader(fs::File::open(configpath) .map_err(|_| Errorfr::ItemJsonMissing)?) .map_err(|_| Errorfr::ItemJsonCorrupt)?; @@ -63,6 +63,8 @@ fn cook() -> Result<(), Errorfr> { .map_err(|_| Errorfr::ShinyJsonCorrupt)?; // println!("{:?}",idsmap.get("airDamage")); + + // create necessary variables let mut out = Vec::new(); let ver = TransformVersion::Version1;