From b8206baac8fd90a44d93c7f0c857c49aae9abfb4 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Mon, 22 Apr 2024 17:49:24 +0800 Subject: [PATCH] update exception messages --- src/EcsPipeline.cs | 2 +- src/EcsRunner.cs | 2 +- src/EcsWorld.cs | 2 +- src/EcsWorld.pools.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EcsPipeline.cs b/src/EcsPipeline.cs index 084665c..62bae33 100644 --- a/src/EcsPipeline.cs +++ b/src/EcsPipeline.cs @@ -113,7 +113,7 @@ namespace DCFApixels.DragonECS { return (T)result; } - Throw.UndefinedException(); + Throw.Exception("No matching runner found."); return default; } public bool TryGetRunner(out T runner) where T : IEcsProcess diff --git a/src/EcsRunner.cs b/src/EcsRunner.cs index fdb6f7b..c8037c5 100644 --- a/src/EcsRunner.cs +++ b/src/EcsRunner.cs @@ -96,7 +96,7 @@ namespace DCFApixels.DragonECS { if (_isInit) { - Throw.UndefinedException(); + Throw.Exception("Reinitialization."); } _isInit = true; _source = source; diff --git a/src/EcsWorld.cs b/src/EcsWorld.cs index 7c176a9..7ea189a 100644 --- a/src/EcsWorld.cs +++ b/src/EcsWorld.cs @@ -145,7 +145,7 @@ namespace DCFApixels.DragonECS if (_worlds[worldID] != null) { _worldIdDispenser.Release(worldID); - Throw.UndefinedException(); + Throw.Exception("The world with the specified ID has already been created\r\n"); } } id = worldID; diff --git a/src/EcsWorld.pools.cs b/src/EcsWorld.pools.cs index dbe11b7..077be5e 100644 --- a/src/EcsWorld.pools.cs +++ b/src/EcsWorld.pools.cs @@ -147,7 +147,7 @@ namespace DCFApixels.DragonECS .First(o => o.IsGenericType && o.GetGenericTypeDefinition() == typeof(IEcsPoolImplementation<>)) .GetGenericArguments()[0]) { - Throw.UndefinedException(); + Throw.Exception("A custom pool must implement the interface IEcsPoolImplementation where T is the type that stores the pool."); } #pragma warning restore IL2090 // 'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The generic parameter of the source method or type does not have matching annotations. #endif