From f1ec1d626d0cdddcaf2e8d3b0086690651218930 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Sat, 5 Dec 2020 15:40:02 -0500 Subject: [PATCH] Tidy for now --- zebrad/src/bin/zebrad/main.rs | 37 ++++++++++++----------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/zebrad/src/bin/zebrad/main.rs b/zebrad/src/bin/zebrad/main.rs index 6c4bf1c4..5b14bce2 100644 --- a/zebrad/src/bin/zebrad/main.rs +++ b/zebrad/src/bin/zebrad/main.rs @@ -3,32 +3,21 @@ #![deny(warnings, missing_docs, trivial_casts, unused_qualifications)] #![forbid(unsafe_code)] -// use zebrad::application::APPLICATION; +use zebrad::application::APPLICATION; /// Boot Zebrad fn main() { - // if cfg!(feature = "enable-sentry") { + if cfg!(feature = "enable-sentry") { + // The Sentry default config pulls in the DSN from the `SENTRY_DSN` + // environment variable. + let _guard = sentry::init( + sentry::ClientOptions { + debug: true, + ..Default::default() + } + .add_integration(sentry_tracing::TracingIntegration::default()), + ); + } - // The Sentry default config pulls in the DSN from the `SENTRY_DSN` - // environment variable. - let _guard = sentry::init( - sentry::ClientOptions { - debug: true, - ..Default::default() - }, // .add_integration(sentry_tracing::TracingIntegration::default()), - ); - // } - - let next = std::panic::take_hook(); - std::panic::set_hook(Box::new(move |info| { - println!("Caught panic"); - sentry::integrations::panic::panic_handler(info); - next(info); - })); - - sentry::capture_message("Hello World!", sentry::Level::Info); - - panic!("Everything is on fire!"); - - //abscissa_core::boot(&APPLICATION); + abscissa_core::boot(&APPLICATION); }