refactor: Renamed Exception Message on TypeFactory
This commit is contained in:
parent
86b9206515
commit
7e48eb8f12
@ -26,7 +26,7 @@ public static class TypeFactory
|
||||
result = Activator.CreateInstance(type) as T;
|
||||
|
||||
if (result is null)
|
||||
throw new Exception($"{type.Name} of type {type.Name} could not be created.");
|
||||
throw new Exception($"{type.Name} could not be created or casted to {typeof(T).Name}.");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user