mirror of https://github.com/ppy/osu
Throw instead of returning zero
This commit is contained in:
parent
2ab4a7293e
commit
e61a90d469
|
@ -29,7 +29,7 @@ public static IEnumerable<T> GetValuesInOrder<T>()
|
|||
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.");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue