diff --git a/Cargo.toml b/Cargo.toml index ca265f4..f9efb42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,5 @@ maze_generator = "2" once_cell = "1" pathfinding = "4" rand = "0.8" -sentry = "0.29" serde = "1" shadowcast = "0.8" \ No newline at end of file diff --git a/src/error.rs b/src/error.rs index 1e60dee..cd8c8f0 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,9 +4,6 @@ use std::{panic, thread}; use backtrace::Backtrace; use bevy::prelude::*; -#[derive(Resource)] -struct Guard(sentry::ClientInitGuard); - pub fn error_handler(In(result): In>>) { if let Err(e) = result { error!("{}", e); @@ -47,29 +44,10 @@ fn init_panic_handler() { })); } -#[derive(Resource, Clone, Debug, Default)] -pub struct ErrorConfig { - pub sentry_dsn: Option, - pub version: Option, -} - pub struct ErrorPlugin; impl Plugin for ErrorPlugin { - fn build(&self, app: &mut App) { + fn build(&self, _app: &mut App) { init_panic_handler(); - if let Some(config) = app.world.get_resource::() { - if let Some(dsn) = &config.sentry_dsn { - let release = config.version.clone().unwrap_or_default(); - let guard = sentry::init(( - dsn.as_str(), - sentry::ClientOptions { - release: Some(release.into()), - ..default() - }, - )); - app.insert_resource(Guard(guard)); - } - } } }