diff options
author | Till Hoeppner | 2015-07-28 00:35:57 +0200 |
---|---|---|
committer | Till Hoeppner | 2015-07-28 00:35:57 +0200 |
commit | 01703f2dcd807f58c03a83bf1d3fa52e8023a0ad (patch) | |
tree | 8d6b48c48481ce6b824b517fd29182494e61a709 /src/format/msgpack.rs | |
parent | 2b5c034f133fe55aaf9e5d69c98cafcfee139a11 (diff) | |
download | ilc-01703f2dcd807f58c03a83bf1d3fa52e8023a0ad.tar.gz ilc-01703f2dcd807f58c03a83bf1d3fa52e8023a0ad.tar.xz ilc-01703f2dcd807f58c03a83bf1d3fa52e8023a0ad.zip |
Improved error reporting
Diffstat (limited to 'src/format/msgpack.rs')
-rw-r--r-- | src/format/msgpack.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Event<'a>>; fn next(&mut self) -> Option<::Result<Event<'a>>> { 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)) } } |