iron / persistent

Middleware for sharing data between requests
43 stars 29 forks source link

Implement std::error::Error for PersistentError #45

Closed klieth closed 9 years ago

klieth commented 9 years ago

This allows a PersistentError to be used when creating a new IronError like so:

fn handler(req: &mut Request) -> IronResult<Response> {
    let e : PersistentError = PersistentError::NotFound;
    Err(IronError::new(e, /* ... */))
}
klieth commented 9 years ago

I updated with your comments. Mind taking a look again?

untitaker commented 9 years ago

Thanks @klieth, I've applied your patch to master!