mirror of
https://github.com/Cardidi/ca2d-unity-toolkit.git
synced 2025-12-20 01:06:03 +08:00
feat: Logg was almost done. fix: Some impossible call was fixed in UnityObjectWarp.cs feat: Boxing<T> was force to unbox by explicit cast operator.
28 lines
851 B
C#
28 lines
851 B
C#
using System;
|
|
|
|
namespace Ca2d.Toolkit
|
|
{
|
|
/// <summary>
|
|
/// When Unity Requirements did not fit <see cref="Guard"/> wants, throw this.
|
|
/// </summary>
|
|
public class LoseRequirementException : Exception
|
|
{
|
|
public Type RequiredType { get; }
|
|
|
|
public LoseRequirementException(Type type) : base($"Required type {type?.FullName} was lost when resolving.")
|
|
{
|
|
RequiredType = type;
|
|
}
|
|
|
|
public LoseRequirementException(Object obj) : base($"Required type {obj?.GetType().FullName} was lost when resolving.")
|
|
{
|
|
RequiredType = obj?.GetType();
|
|
}
|
|
|
|
|
|
public LoseRequirementException(ValueType obj) : base($"Required type {obj.GetType().FullName} was lost when resolving.")
|
|
{
|
|
RequiredType = obj.GetType();
|
|
}
|
|
}
|
|
} |