src/section_config.rs - write: improve error message
This commit is contained in:
parent
501f4fa220
commit
c43b36bcb6
@ -155,8 +155,9 @@ impl SectionConfig {
|
|||||||
if section_id.chars().any(|c| c.is_control()) {
|
if section_id.chars().any(|c| c.is_control()) {
|
||||||
bail!("detected unexpected control character in section ID.");
|
bail!("detected unexpected control character in section ID.");
|
||||||
}
|
}
|
||||||
|
if let Err(err) = verify_json_object(section_config, &plugin.properties) {
|
||||||
verify_json_object(section_config, &plugin.properties)?;
|
bail!("verify section '{}' failed - {}", section_id, err);
|
||||||
|
}
|
||||||
|
|
||||||
let head = (self.format_section_header)(type_name, section_id, section_config);
|
let head = (self.format_section_header)(type_name, section_id, section_config);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user