1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

refactor error handling

This commit is contained in:
Nikolay Kim
2017-11-15 20:06:28 -10:00
parent c565965865
commit de71ad7de4
18 changed files with 317 additions and 325 deletions

View File

@@ -14,6 +14,7 @@ use actix::dev::{AsyncContextApi, ActorAddressCell, ActorItemsCell, ActorWaitCel
use task::{IoContext, DrainFut};
use body::Binary;
use error::Error;
use route::{Route, Frame};
use httpresponse::HttpResponse;
@@ -184,9 +185,9 @@ impl<A> HttpContext<A> where A: Actor<Context=Self> + Route {
impl<A> Stream for HttpContext<A> where A: Actor<Context=Self> + Route
{
type Item = Frame;
type Error = std::io::Error;
type Error = Error;
fn poll(&mut self) -> Poll<Option<Frame>, std::io::Error> {
fn poll(&mut self) -> Poll<Option<Frame>, Error> {
if self.act.is_none() {
return Ok(Async::NotReady)
}