Use return value from serialize() and print debug output on failure
This commit is contained in:
parent
f8d90af6d0
commit
b772b34837
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ impl FileHeaderParser for JsonHeaderParser {
|
|||
let mut s = Vec::<u8>::new();
|
||||
{
|
||||
let mut ser = Serializer::pretty(&mut s);
|
||||
data.serialize(&mut ser);
|
||||
data.serialize(&mut ser).map_err(|e| {
|
||||
debug!("Serializer error: {:?}", e);
|
||||
}).ok();
|
||||
}
|
||||
|
||||
String::from_utf8(s).or(
|
||||
|
|
Loading…
Reference in a new issue