1#![allow(missing_docs)]
2use rustc_serialize::json;
3use std::io;
4
5error_chain! {
6
7 foreign_links {
8 json::BuilderError, Json;
9 }
10
11 errors {
12 StreamWriteError(err: io::Error, msg: String) {
13 description("error writing to a stream")
14 display("{}: {}", err, msg)
15 }
16
17 FileReadError(err: io::Error, filename: String) {
18 description("error reading from a file")
19 display("{}: {}", err, filename)
20 }
21
22 UnexpectedDataType(data: String) {
23 description("unexpected data type")
24 display("{}", data)
25 }
26
27 UnexpectedNodeType(t: String) {
28 description("unexpected node type")
29 display("{}", t)
30 }
31 }
32}