use error-chain in ethcore-network

This commit is contained in:
debris
2017-11-13 14:37:08 +01:00
parent b9fbe52f32
commit 3cf52dac59
28 changed files with 235 additions and 244 deletions

View File

@@ -67,9 +67,9 @@ extern crate parking_lot;
mod service;
mod worker;
use mio::{Token};
use std::{fmt, error};
use mio::deprecated::{EventLoop, NotifyError};
use std::fmt;
use mio::Token;
pub use worker::LOCAL_STACK_SIZE;
@@ -93,6 +93,12 @@ impl fmt::Display for IoError {
}
}
impl error::Error for IoError {
fn description(&self) -> &str {
"IO error"
}
}
impl From<::std::io::Error> for IoError {
fn from(err: ::std::io::Error) -> IoError {
IoError::StdIo(err)