1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(
            bevy_panic_handler::PanicHandler::new()
                .set_title_func(|info| {
                    format!(
                        "Panic at L{}:C{}",
                        info.location().unwrap().line(),
                        info.location().unwrap().column()
                    )
                })
                .build(),
        )
        .add_systems(Startup, || panic!("Example Message"))
        .run();
}