Skip to content

Commit

Permalink
More informative error message on missing stage (#1048)
Browse files Browse the repository at this point in the history
More informative error message on missing state
  • Loading branch information
alec-deason authored Dec 13, 2020
1 parent 002e22f commit e511cdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e511cdb

Please sign in to comment.