aboutsummaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorTill Hoeppner2015-07-28 00:35:57 +0200
committerTill Hoeppner2015-07-28 00:35:57 +0200
commit01703f2dcd807f58c03a83bf1d3fa52e8023a0ad (patch)
tree8d6b48c48481ce6b824b517fd29182494e61a709 /src/format
parent2b5c034f133fe55aaf9e5d69c98cafcfee139a11 (diff)
downloadilc-01703f2dcd807f58c03a83bf1d3fa52e8023a0ad.tar.gz
ilc-01703f2dcd807f58c03a83bf1d3fa52e8023a0ad.tar.xz
ilc-01703f2dcd807f58c03a83bf1d3fa52e8023a0ad.zip
Improved error reporting
Diffstat (limited to 'src/format')
-rw-r--r--src/format/msgpack.rs4
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))
}
}