mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-08 02:03:48 +00:00
add http_bail macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
c4febcd773
commit
7d3ffe9b8d
@ -34,3 +34,11 @@ macro_rules! http_err {
|
|||||||
))
|
))
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Bail with an error generated with the `http_err!` macro.
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! http_bail {
|
||||||
|
($status:ident, $($fmt:tt)+) => {{
|
||||||
|
return Err($crate::http_err!($status, $($fmt)+));
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user