We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a05515b commit 8947c86Copy full SHA for 8947c86
RuriLib/Helpers/Blocks/DescriptorsRepository.cs
@@ -197,8 +197,12 @@ private static BlockParameter BuildBlockParameter(ParameterInfo info)
197
/// </summary>
198
public static VariableType? ToVariableType(Type type)
199
{
200
- _variableTypes.TryGetValue(type, out var value);
201
- return value ?? throw new InvalidCastException(
+ if (_variableTypes.TryGetValue(type, out var value))
+ {
202
+ return value;
203
+ }
204
+
205
+ throw new InvalidCastException(
206
$"The type {type} could not be casted to VariableType");
207
}
208
0 commit comments