Struct iron::error::IronError [] [src]

pub struct IronError {
    pub error: Box<Error + Send>,
    pub response: Response,
}

The type of Errors inside and when using Iron.

IronError informs its receivers of two things:

  • What went wrong
  • What to do about it

The error field is responsible for informing receivers of which error occured, and receivers may also modify the error field by layering it (building up a cause chain).

The response field provides a tangible action to be taken if this error is not otherwise handled.

Fields

error: Box<Error + Send>

The underlying error

This can be layered and will be logged at the end of an errored request.

response: Response

What to do about this error.

This Response will be used when the error-handling flow finishes.

Methods

impl IronError
[src]

fn new<E: Error, M: Modifier<Response>>(e: E, m: M) -> IronError

Create a new IronError from an error and a modifier.

Trait Implementations

impl Debug for IronError
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for IronError
[src]

fn fmt(&self, f: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl StdError for IronError
[src]

fn description(&self) -> &str

A short description of the error. Read more

fn cause(&self) -> Option<&StdError>

The lower-level cause of this error, if any. Read more