From 01703f2dcd807f58c03a83bf1d3fa52e8023a0ad Mon Sep 17 00:00:00 2001 From: Till Hoeppner Date: Tue, 28 Jul 2015 00:35:57 +0200 Subject: Improved error reporting --- src/format/msgpack.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/format/msgpack.rs') diff --git a/src/format/msgpack.rs b/src/format/msgpack.rs index 3519b76..d823a6d 100644 --- a/src/format/msgpack.rs +++ b/src/format/msgpack.rs @@ -34,14 +34,14 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { type Item = ::Result>; fn next(&mut self) -> Option<::Result>> { Some(Decodable::decode(&mut Decoder::new(&mut self.input)) - .map_err(|_| ::IlcError::BincodeDecode)) + .map_err(|e| ::IlcError::MsgpackDecode(e))) } } impl<'a, W> Encode<'a, W> for Msgpack where W: Write { fn encode(&'a self, _context: &'a Context, mut output: W, event: &'a Event) -> ::Result<()> { event.encode(&mut Encoder::new(&mut output)) - .map_err(|_| ::IlcError::BincodeEncode) + .map_err(|e| ::IlcError::MsgpackEncode(e)) } } -- cgit v1.2.3