report_error

Function report_error 

Source
pub fn report_error(
    id: impl Into<Cow<'static, str>>,
    error: impl Into<Cow<'static, str>>,
)
Expand description

Stores an error message with the given ID. This is useful for immediate mode error reporting when you don’t want to pollute the log on every frame.

When --features dev is active, errors will show in an egui window in game.

The id parameter can be any string. We’re using Cow<'static, str> to save on allocations for ids/errors that can be represented as &'static str.