mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
todo
This commit is contained in:
parent
9c2fe13194
commit
e42d2edbbf
@ -1,4 +1,5 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
@ -52,8 +53,8 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
//_executeMarker.Begin();
|
||||
if (span.IsNull) throw new System.ArgumentNullException();//TODO составить текст исключения.
|
||||
if (span.WorldID != WorldID) throw new System.ArgumentException();//TODO составить текст исключения.
|
||||
if (span.IsNull) { Throw.ArgumentNull(nameof(span)); }
|
||||
if (span.WorldID != WorldID) { Throw.Quiery_ArgumentDifferentWorldsException(); }
|
||||
#endif
|
||||
EcsSpan result;
|
||||
if (_lastWorldVersion != World.Version)
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
@ -54,8 +55,8 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
_executeMarker.Begin();
|
||||
if (span.IsNull) throw new System.ArgumentNullException();//TODO составить текст исключения.
|
||||
if (span.WorldID != WorldID) throw new System.ArgumentException();//TODO составить текст исключения.
|
||||
if (span.IsNull) { Throw.ArgumentNull(nameof(span)); }
|
||||
if (span.WorldID != WorldID) { Throw.Quiery_ArgumentDifferentWorldsException(); }
|
||||
#endif
|
||||
if (_lastWorldVersion != World.Version)
|
||||
{
|
||||
|
@ -113,9 +113,19 @@ namespace DCFApixels.DragonECS.Internal
|
||||
internal static void Ent_ThrowIsNotAlive(entlong entity)
|
||||
{
|
||||
if (entity.IsNull)
|
||||
{
|
||||
throw new EcsFrameworkException($"The {entity} is null.");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new EcsFrameworkException($"The {entity} is not alive.");
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
internal static void Quiery_ArgumentDifferentWorldsException()
|
||||
{
|
||||
throw new ArgumentException("The groups belong to different worlds.");
|
||||
}
|
||||
|
||||
|
||||
@ -125,6 +135,11 @@ namespace DCFApixels.DragonECS.Internal
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
internal static void ArgumentNull(string paramName)
|
||||
{
|
||||
throw new ArgumentNullException(paramName);
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
internal static void ArgumentOutOfRange()
|
||||
{
|
||||
throw new ArgumentOutOfRangeException($"index is less than 0 or is equal to or greater than Count.");
|
||||
|
Loading…
Reference in New Issue
Block a user