We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 057099b commit f349ad1Copy full SHA for f349ad1
src/ImageSharp.Web/Commands/CommandParser.cs
@@ -67,14 +67,10 @@ public CommandParser(IEnumerable<ICommandConverter> converters)
67
}
68
69
70
- // We don't actually return here.
71
- // The compiler just cannot see our exception.
72
- ThrowNotSupported(type);
73
- return default;
+ return ThrowNotSupported<T>(type);
74
75
76
- [MethodImpl(MethodImplOptions.NoInlining)]
77
[DoesNotReturn]
78
- private static void ThrowNotSupported(Type type)
+ private static T ThrowNotSupported<T>(Type type)
79
=> throw new NotSupportedException($"Cannot convert to {type.FullName}.");
80
0 commit comments