2018-09-17 03:52:07 +00:00
|
|
|
#[macro_use] extern crate rocket;
|
2018-09-16 07:33:16 +00:00
|
|
|
|
2018-09-17 03:52:07 +00:00
|
|
|
use rocket::Request;
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
|
|
#[catch(404)]
|
|
|
|
struct Catcher(String);
|
|
|
|
|
|
|
|
#[catch(404)]
|
|
|
|
const CATCH: &str = "Catcher";
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
#[catch("404")]
|
2018-09-16 07:33:16 +00:00
|
|
|
fn e1(_request: &Request) { }
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
#[catch(code = "404")]
|
2018-09-16 07:33:16 +00:00
|
|
|
fn e2(_request: &Request) { }
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
#[catch(code = 404)]
|
2018-09-16 07:33:16 +00:00
|
|
|
fn e3(_request: &Request) { }
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
#[catch(99)]
|
2018-09-16 07:33:16 +00:00
|
|
|
fn e4(_request: &Request) { }
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
#[catch(600)]
|
2018-09-16 07:33:16 +00:00
|
|
|
fn e5(_request: &Request) { }
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
#[catch(400, message = "foo")]
|
2018-09-16 07:33:16 +00:00
|
|
|
fn e5(_request: &Request) { }
|
|
|
|
|
|
|
|
#[catch(404)]
|
2024-05-02 22:11:00 +00:00
|
|
|
fn f3(_request: &Request, _other: bool) { }
|
2018-12-29 17:31:14 +00:00
|
|
|
|
|
|
|
fn main() { }
|