diff --git a/src/Stunts/DefaultValueProvider.cs b/src/Stunts/DefaultValueProvider.cs index afc5abe..781e1c8 100644 --- a/src/Stunts/DefaultValueProvider.cs +++ b/src/Stunts/DefaultValueProvider.cs @@ -204,7 +204,8 @@ public GeneratedDefault(Func create, Func Array.CreateInstance( - type.GetElementType() ?? throw new ArgumentException(nameof(type)), new int[type.GetArrayRank()]); + type.GetElementType() ?? throw new ArgumentException("Type must be an array type.", nameof(type)), + new int[type.GetArrayRank()]); static object CreateEnumerable(Type type) => Enumerable.Empty();