Skip to content

Commit 18115db

Browse files
authored
fix: restore FormatException in BaseConverter for malformed input (#2)
1 parent e4d6fb6 commit 18115db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sources/core/Stride.Core.Design/TypeConverters/BaseConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected static string ConvertFromValues<T>(ITypeDescriptorContext context, Cul
120120
{
121121
var split = comp.Split(':');
122122
if (split.Length != 2)
123-
throw new NotSupportedException("The string does not match the expected format.");
123+
throw new FormatException("The string does not match the expected format.");
124124
var property = Properties.Cast<FieldPropertyDescriptor>().First(x => x.Name == split[0]);
125125
var compValue = converter.ConvertFromString(context, culture, split[1]);
126126
property.FieldInfo.SetValue(result, compValue);

0 commit comments

Comments
 (0)