From 1904fc4b8639d3be5e450841f9f0a3c3d2d13d25 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Sat, 16 Mar 2024 14:21:38 +0800 Subject: [PATCH] Update Exceptions.cs --- src/Utils/Exceptions.cs | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/Utils/Exceptions.cs b/src/Utils/Exceptions.cs index 1697774..824dbe3 100644 --- a/src/Utils/Exceptions.cs +++ b/src/Utils/Exceptions.cs @@ -30,29 +30,11 @@ namespace DCFApixels.DragonECS.Internal { internal static class Throw { - [MethodImpl(MethodImplOptions.NoInlining)] - internal static void ArgumentNull() - { - throw new ArgumentNullException(); - } - [MethodImpl(MethodImplOptions.NoInlining)] internal static void ConstraintIsAlreadyContainedInMask(Type type) { throw new EcsFrameworkException($"The {EcsDebugUtility.GetGenericTypeName(type)} constraint is already contained in the mask."); } - - //[MethodImpl(MethodImplOptions.NoInlining)] - //public static void ArgumentDifferentWorldsException() - //{ - // throw new ArgumentException("The groups belong to different worlds."); - //} - [MethodImpl(MethodImplOptions.NoInlining)] - internal static void ArgumentOutOfRange() - { - throw new ArgumentOutOfRangeException($"index is less than 0 or is equal to or greater than Count."); - } - [MethodImpl(MethodImplOptions.NoInlining)] internal static void Group_AlreadyContains(int entityID) { @@ -128,6 +110,18 @@ namespace DCFApixels.DragonECS.Internal else throw new EcsFrameworkException($"The {entity} is not alive."); } + + + [MethodImpl(MethodImplOptions.NoInlining)] + internal static void ArgumentNull() + { + throw new ArgumentNullException(); + } + [MethodImpl(MethodImplOptions.NoInlining)] + internal static void ArgumentOutOfRange() + { + throw new ArgumentOutOfRangeException($"index is less than 0 or is equal to or greater than Count."); + } [MethodImpl(MethodImplOptions.NoInlining)] internal static void UndefinedException() {