panic/panic.rs
1#[macro_use]
2extern crate rocket;
3
4use rocket::{Build, Rocket};
5
6use rocket_sentry::RocketSentry;
7
8#[get("/panic?<msg>")]
9fn panic(msg: Option<String>) -> String {
10 panic!("{}", msg.unwrap_or("You asked for it!".to_string()));
11}
12
13#[launch]
14fn rocket() -> Rocket<Build> {
15 rocket::build()
16 .attach(RocketSentry::fairing())
17 .mount("/", routes![panic])
18}