Only log panics in release builds.
This commit is contained in:
parent
6a49deaefd
commit
10bf503c89
|
@ -53,7 +53,9 @@ pub struct ErrorPlugin;
|
|||
|
||||
impl Plugin for ErrorPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
init_panic_handler();
|
||||
if !cfg!(debug_assertions) {
|
||||
init_panic_handler();
|
||||
}
|
||||
if let Some(config) = app.world.get_resource::<ErrorConfig>() {
|
||||
if let Some(dsn) = &config.sentry_dsn {
|
||||
let guard = sentry::init(dsn.clone());
|
||||
|
|
Loading…
Reference in New Issue
Block a user