refactor: Renamed Exception Message on TypeFactory

This commit is contained in:
Syntriax 2024-02-10 17:12:14 +03:00
parent 86b9206515
commit 7e48eb8f12
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}