bevy_mod_sysfail 7.0.0

Decorate your bevy system with the sysfail macro attribute to handle failure.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{Callsite, Failure, Level};

/// Do nothing with errors in `#[sysfail]` systems.
pub struct Ignore;

impl<T: std::fmt::Debug> From<T> for Ignore {
    fn from(_: T) -> Self {
        Self
    }
}

impl Failure for Ignore {
    type Param = ();

    const LEVEL: Level = Level::TRACE;

    fn handle_error(self, (): (), _: Option<&'static impl Callsite>) {}
}