Syntriax.Engine/Engine.Core/Exceptions/NotAssignedException.cs

10 lines
331 B
C#

using System;
namespace Syntriax.Engine.Core.Exceptions;
public class NotAssignedException(string? message) : Exception(message)
{
public static NotAssignedException From<T1, T2>(T1 to, T2? value)
=> new($"{value?.GetType().FullName ?? "\"null\""} has not been assigned to {to?.GetType().FullName ?? "\"null\""}");
}