More informative error message on missing stage (#1048)
More informative error message on missing state
This commit is contained in:
parent
002e22fca0
commit
e511cdbda7
@ -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 New Issue
Block a user