if let Some(anyway) = anyway.ok(&y) { return Some(anyway) }
y.context("read")?;
+ self.read_string(s, path)?;
+ None
+ }
+
+ #[throws(AE)] // AE does not include path
+ fn read_string(&mut self, s: String, path_for_loc: &Path) {
let mut ini = Ini::new_cs();
ini.set_default_section(OUTSIDE_SECTION);
ini.read(s).map_err(|e| anyhow!("{}", e)).context("parse as INI")?;
throw!(anyhow!("INI file contains settings outside a section"));
}
- let loc = Arc::new(path.to_owned());
+ let loc = Arc::new(path_for_loc.to_owned());
for (sn, vars) in map {
dbg!( InstanceConfig::FIELDS );// check xxx vars are in fields
})
);
}
- None
+
}
#[throws(AE)] // AE includes path