[][src]Attribute Macro bevy_fallible_derive::fallible_system

#[fallible_system]

A function attribute to use with fallible systems. By default, will convert a system that returns a Result to system with no return value, and will propagate errors as bevy events.

#[fallible_system]
fn system(asset_server: Res<AssetServer>) -> anyhow::Result<()> {
    let handle: Handle<Texture> = asset_server.load("texture")?;
}

fn main() {
    App::build()
        .add_startup_system(system.system())
        .run();
}