Skip to content

Commit

Permalink
improve exception
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ11teen committed Mar 10, 2023
1 parent 9cc5285 commit 18a309a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public KeyValueTypeDiscriminator(Type baseType, string targetKey, IDictionary<st
{
if (!baseType.IsAssignableFrom(keyValuePair.Value))
{
throw new ArgumentOutOfRangeException($"{nameof(typeMapping)} dictionary contains type {keyValuePair.Value} which is not a assignable to {baseType}");
throw new ArgumentOutOfRangeException(nameof(typeMapping), $"{keyValuePair.Value} is not a assignable to {baseType}");
}
}
this.BaseType = baseType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public UniqueKeyTypeDiscriminator(Type baseType, IDictionary<string, Type> typeM
{
if (!baseType.IsAssignableFrom(keyValuePair.Value))
{
throw new ArgumentOutOfRangeException($"{nameof(typeMapping)} dictionary contains type {keyValuePair.Value} which is not a assignable to {baseType}");
throw new ArgumentOutOfRangeException(nameof(typeMapping), $"{keyValuePair.Value} is not a assignable to {baseType}");
}
}
this.BaseType = baseType;
Expand Down

0 comments on commit 18a309a

Please sign in to comment.