From 7e48eb8f12ea0e3c47f16a71ac350998415590b1 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sat, 10 Feb 2024 17:12:14 +0300 Subject: [PATCH] refactor: Renamed Exception Message on TypeFactory --- Engine.Core/Factory/TypeFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }