Improve the error message on judge not found.
This commit is contained in:
@@ -90,7 +90,10 @@ namespace Cryville.Crtr.Ruleset {
|
||||
}
|
||||
void InsertEvent(Chart.Judge ev, Clip clip, Identifier id, NoteHandler handler, JudgeCallContext call = default(JudgeCallContext)) {
|
||||
if (id.Key == _var_pause) throw new InvalidOperationException("Cannot assign the special judge \"pause\" to notes");
|
||||
var def = _rs.judges[id];
|
||||
JudgeDefinition def;
|
||||
if (!_rs.judges.TryGetValue(id, out def)) {
|
||||
throw new ArgumentException(string.Format("The chart uses a judge named \"{0}\" that is undefined in the ruleset.", id));
|
||||
}
|
||||
_etor.Evaluate(_identop, def.input);
|
||||
_etor.Evaluate(_clipop, def.clip);
|
||||
var list = evs[_identbuf];
|
||||
|
Reference in New Issue
Block a user