Development Merge 2025.04.01 #1

Merged
Syntriax merged 32 commits from development into main 2025-04-01 19:20:18 +03:00
2 changed files with 2 additions and 9 deletions
Showing only changes of commit 62b43025b9 - Show all commits

View File

@ -7,13 +7,6 @@ public class AssignException : Exception
public AssignException() : base("Assign operation has failed.") { }
public AssignException(string? message) : base(message) { }
// public static AssignException FromStateEnable(IStateEnable? stateEnable)
// => new AssignException($"{nameof(IGameObject.AssignStateEnable)} failed on type {stateEnable?.GetType().ToString() ?? "\"null\""}");
public static AssignException From<T, T2>(T to, T2? value)
=> new($"Assign operation has failed on T: {typeof(T).FullName}, value: {value?.GetType().ToString() ?? "\"null\""}");
// public static AssignException FromBehaviourController(IBehaviourController? behaviourController)
// => new AssignException($"{nameof(IGameObject.AssignBehaviourController)} failed on type {behaviourController?.GetType().ToString() ?? "\"null\""}");
=> new($"Assign operation has failed on T: {to?.GetType().FullName ?? "\"null\""}, value: {value?.GetType().ToString() ?? "\"null\""}");
}
// throw new Exception($"{nameof(IGameObject.AssignTransform)} failed on type {transform?.GetType().ToString() ?? "null"} for type {typeof(T).FullName}");
// throw new Exception($"{nameof(IGameObject.AssignBehaviourController)} failed on type {behaviourController?.GetType().ToString() ?? "null"} for type {typeof(T).FullName}");
// throw new Exception($"{nameof(IGameObject.AssignStateEnable)} failed on type {stateEnable?.GetType().ToString() ?? "null"} for type {typeof(T).FullName}");

View File

@ -9,7 +9,7 @@ public class NotAssignedException : Exception
public NotAssignedException(string? message) : base(message) { }
public static NotAssignedException From<T1, T2>(T1 to, T2? value) where T1 : IAssignable
=> new($"{typeof(T2).Name} has not been assigned to {typeof(T1).Name}");
=> new($"{value?.GetType().FullName ?? "\"null\""} has not been assigned to {to?.GetType().FullName ?? "\"null\""}");
public static void Check<T1, T2>(T1 to, T2? value) where T1 : IAssignable
{