mirror of
https://github.com/DCFApixels/DragonECS-AutoInjections.git
synced 2025-09-18 05:04:35 +08:00
update exceptions
This commit is contained in:
parent
ab83f0fdc7
commit
6c0856a252
@ -1,8 +1,8 @@
|
|||||||
|
using DCFApixels.DragonECS.AutoInjectionsInternal;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using static DCFApixels.DragonECS.EcsThrowHalper;
|
|
||||||
|
|
||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
{
|
{
|
||||||
|
@ -5,25 +5,28 @@ using System.Runtime.Serialization;
|
|||||||
|
|
||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
{
|
{
|
||||||
public static class EcsThrowHalper_AutoInjections
|
namespace AutoInjectionsInternal
|
||||||
|
{
|
||||||
|
internal static class Throw
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
internal static void PropertyIsCantWrite(this EcsThrowHalper _, MemberInfo obj)
|
internal static void PropertyIsCantWrite(MemberInfo obj)
|
||||||
{
|
{
|
||||||
throw new EcsAutoInjectionException($"{obj.Name} property is cant write");
|
throw new EcsAutoInjectionException($"{obj.Name} property is cant write");
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
internal static void MethodIsGeneric(this EcsThrowHalper _, MemberInfo obj)
|
internal static void MethodIsGeneric(MemberInfo obj)
|
||||||
{
|
{
|
||||||
throw new EcsAutoInjectionException($"{obj.Name} method is Generic");
|
throw new EcsAutoInjectionException($"{obj.Name} method is Generic");
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||||
internal static void MethodArgumentsGreater1(this EcsThrowHalper _, MemberInfo obj)
|
internal static void MethodArgumentsGreater1(MemberInfo obj)
|
||||||
{
|
{
|
||||||
//method X has arguments greater than 1.
|
//method X has arguments greater than 1.
|
||||||
throw new EcsAutoInjectionException($"{obj.Name} method Arguments != 1");
|
throw new EcsAutoInjectionException($"{obj.Name} method Arguments != 1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class EcsAutoInjectionException : Exception
|
public class EcsAutoInjectionException : Exception
|
||||||
|
Loading…
Reference in New Issue
Block a user