macro_rules! http_err {
($status: path, $fmt: literal, $($args: tt)+) => { ... };
($status: path, $msg: literal) => { ... };
($fmt: literal, $($args: tt)+) => { ... };
($msg: literal) => { ... };
}Expand description
Construct an ad-hoc error from a string or existing error value.
This evaluates to an HttpError. It can take either just a string, or a format string with arguments. It also can take any custom type which implements Debug and Display.
If status code is not specified, INTERNAL_SERVER_ERROR will be used.