update exception messages

This commit is contained in:
Mikhail 2024-04-22 17:49:24 +08:00
parent b661faf38e
commit b8206baac8
4 changed files with 4 additions and 4 deletions

View File

@ -113,7 +113,7 @@ namespace DCFApixels.DragonECS
{ {
return (T)result; return (T)result;
} }
Throw.UndefinedException(); Throw.Exception("No matching runner found.");
return default; return default;
} }
public bool TryGetRunner<T>(out T runner) where T : IEcsProcess public bool TryGetRunner<T>(out T runner) where T : IEcsProcess

View File

@ -96,7 +96,7 @@ namespace DCFApixels.DragonECS
{ {
if (_isInit) if (_isInit)
{ {
Throw.UndefinedException(); Throw.Exception("Reinitialization.");
} }
_isInit = true; _isInit = true;
_source = source; _source = source;

View File

@ -145,7 +145,7 @@ namespace DCFApixels.DragonECS
if (_worlds[worldID] != null) if (_worlds[worldID] != null)
{ {
_worldIdDispenser.Release(worldID); _worldIdDispenser.Release(worldID);
Throw.UndefinedException(); Throw.Exception("The world with the specified ID has already been created\r\n");
} }
} }
id = worldID; id = worldID;

View File

@ -147,7 +147,7 @@ namespace DCFApixels.DragonECS
.First(o => o.IsGenericType && o.GetGenericTypeDefinition() == typeof(IEcsPoolImplementation<>)) .First(o => o.IsGenericType && o.GetGenericTypeDefinition() == typeof(IEcsPoolImplementation<>))
.GetGenericArguments()[0]) .GetGenericArguments()[0])
{ {
Throw.UndefinedException(); Throw.Exception("A custom pool must implement the interface IEcsPoolImplementation<T> 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. #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 #endif