diff --git a/Engine.Core/Factory/TypeFactory.cs b/Engine.Core/Factory/TypeFactory.cs index d58ff65..8798642 100644 --- a/Engine.Core/Factory/TypeFactory.cs +++ b/Engine.Core/Factory/TypeFactory.cs @@ -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; }