src/section_config.rs - write: improve error message
This commit is contained in:
parent
f51420ba1f
commit
4566303b05
|
@ -113,8 +113,9 @@ impl SectionConfig {
|
|||
self.plugins.insert(plugin.type_name.clone(), plugin);
|
||||
}
|
||||
|
||||
pub fn write(&self, _filename: &str, config: &SectionConfigData) -> Result<String, Error> {
|
||||
pub fn write(&self, filename: &str, config: &SectionConfigData) -> Result<String, Error> {
|
||||
|
||||
try_block!({
|
||||
let mut list = VecDeque::new();
|
||||
|
||||
let mut done = HashSet::new();
|
||||
|
@ -173,6 +174,7 @@ impl SectionConfig {
|
|||
}
|
||||
|
||||
Ok(raw)
|
||||
}).map_err(|e: Error| format_err!("writing '{}' failed: {}", filename, e))
|
||||
}
|
||||
|
||||
pub fn parse(&self, filename: &str, raw: &str) -> Result<SectionConfigData, Error> {
|
||||
|
|
Loading…
Reference in New Issue