@ -149,7 +149,7 @@ public class EntityPath
if (!throwOnNotFound) return Entity.None;
var startStr = EntityRef.CreateOrNull(world, start)?.GetFullPath().ToString() ?? start.ToString();
throw new World.EntityNotFoundException(
throw new EntityNotFoundException(
start.IsNone ? $"Entity at '{path}' not found"
: (start == parent) ? $"Child entity of '{startStr}' at '{path}' not found"
: $"Entity at scope '{startStr}' at '{path}' not found");
@ -32,8 +32,7 @@ public unsafe partial class World
public EntityRef LookupBySymbolOrThrow(string symbol)
=> LookupBySymbol(symbol) ?? throw new EntityNotFoundException(
$"Entity with symbol '{symbol}' not found");
}
public class EntityNotFoundException : Exception
{ public EntityNotFoundException(string message) : base(message) { } }