1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-31 06:29:54 +08:00

Throw instead of returning zero

This commit is contained in:
Dean Herbert
2020-04-20 15:50:48 +09:00
Unverified
parent 2ab4a7293e
commit e61a90d469
+1 -1
View File
@@ -29,7 +29,7 @@ namespace osu.Game.Utils
if (type.GetField(i.ToString()).GetCustomAttributes(typeof(OrderAttribute), false).FirstOrDefault() is OrderAttribute attr)
return attr.Order;
return 0;
throw new ArgumentException($"Not all values of {nameof(T)} have {nameof(OrderAttribute)} specified.");
});
}
}