starbase/diagnostics.rs
1use starbase_styles::theme::create_graphical_theme;
2
3pub use miette::*;
4
5#[tracing::instrument]
6pub fn setup_miette() {
7 miette::set_panic_hook();
8
9 miette::set_hook(Box::new(|_| {
10 Box::new(
11 miette::MietteHandlerOpts::new()
12 .with_cause_chain()
13 .graphical_theme(create_graphical_theme())
14 .build(),
15 )
16 }))
17 .unwrap();
18}