mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
More informative error message on missing stage (#1048)
More informative error message on missing state
This commit is contained in:
parent
002e22fca0
commit
e511cdbda7
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ impl Schedule {
|
|||
) -> &mut Self {
|
||||
let stage = self
|
||||
.get_stage_mut::<T>(name)
|
||||
.expect("stage does not exist or is the wrong type");
|
||||
.unwrap_or_else(|| panic!("stage '{}' does not exist or is the wrong type", name));
|
||||
func(stage);
|
||||
self
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue