Macro rouille_maint_in::response_panic[][src]

macro_rules! response_panic {
    () => { ... };
    ($msg:expr $(,)?) => { ... };
    ($fmt:expr, $($arg:tt)+) => { ... };
}

Calls the panic! macro from the standard library wrapped in a Response-typed expression, to avoid the compiler complaining about unreachable paths in certain styles of router! blocks. The macro supports exactly the same types of arguments as the one in std.

Example

router!(request,
    (GET) (/panic) => {
        response_panic!("Oops!");
    },
    _ => (),
)