2017-03-08 19:34:17 +00:00
|
|
|
//! Provides an error type for this crate.
|
|
|
|
|
2017-02-19 19:46:44 +00:00
|
|
|
use std::io;
|
|
|
|
|
|
|
|
use std::convert::From;
|
|
|
|
|
|
|
|
use xml::writer::Error as WriterError;
|
|
|
|
use xml::reader::Error as ReaderError;
|
|
|
|
|
2017-05-22 17:20:01 +00:00
|
|
|
error_chain! {
|
|
|
|
foreign_links {
|
|
|
|
XmlWriterError(WriterError)
|
|
|
|
/// An error with writing an XML event, from xml::writer::EventWriter.
|
|
|
|
;
|
|
|
|
XmlReaderError(ReaderError)
|
|
|
|
/// An error with reading an XML event, from xml::reader::EventReader.
|
|
|
|
;
|
|
|
|
IoError(io::Error)
|
|
|
|
/// An I/O error, from std::io.
|
|
|
|
;
|
2017-02-19 19:46:44 +00:00
|
|
|
}
|
|
|
|
|
2017-05-22 17:20:01 +00:00
|
|
|
errors {
|
|
|
|
/// En error which is returned when the end of the document was reached prematurely.
|
|
|
|
EndOfDocument {
|
|
|
|
description("the end of the document has been reached prematurely")
|
|
|
|
display("the end of the document has been reached prematurely")
|
|
|
|
}
|
2017-02-19 19:46:44 +00:00
|
|
|
}
|
|
|
|
}
|