Commit 81dfa51b authored by jocutajar's avatar jocutajar

log event parsing errors

parent 55855fdb
......@@ -11,6 +11,7 @@ exclude = ["target", "CHANGELOG.md", "image.png", "Cargo.lock"]
[dependencies]
numtoa = { version = "0.1.0", features = ["std"]}
log = "0.4"
[target.'cfg(not(target_os = "redox"))'.dependencies]
libc = "0.2.8"
......
......@@ -110,7 +110,10 @@ where
try_parse_event(item, &mut iter)
};
result
.or(Ok(Event::Unsupported(buf.clone())))
.or_else(|err| {
warn!("Event parse error: {}", err);
Ok(Event::Unsupported(buf.clone()))
})
.map(|e| (e, buf))
}
......
......@@ -13,6 +13,9 @@
extern crate numtoa;
#[macro_use]
extern crate log;
#[cfg(target_os = "redox")]
#[path="sys/redox/mod.rs"]
mod sys;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment