Syntriax.Engine/Engine.Core/Exceptions/AssignFailedException.cs

10 lines
350 B
C#

using System;
namespace Syntriax.Engine.Core.Exceptions;
public class AssignFailedException(string? message) : Exception(message)
{
public static AssignFailedException From<T, T2>(T to, T2? value)
=> new($"Assign operation has failed on T: {to?.GetType().FullName ?? "\"null\""}, value: {value?.GetType().ToString() ?? "\"null\""}");
}