From c949257d1d40dfa2a25097ea6644649df3372d7e Mon Sep 17 00:00:00 2001 From: copygirl Date: Wed, 28 Dec 2022 03:34:42 +0100 Subject: [PATCH] Fix incorrect EntityPath.Lookup exception message --- src/gaemstone.ECS/EntityPath.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gaemstone.ECS/EntityPath.cs b/src/gaemstone.ECS/EntityPath.cs index e8bade4..345157b 100644 --- a/src/gaemstone.ECS/EntityPath.cs +++ b/src/gaemstone.ECS/EntityPath.cs @@ -150,10 +150,9 @@ public class EntityPath var startStr = EntityRef.CreateOrNull(world, start)?.GetFullPath().ToString() ?? start.ToString(); throw new World.EntityNotFoundException( - (start == parent) ? $"Child entity of '{startStr}' at '{path}' not found" - : start.IsSome ? $"Entity at scope '{startStr}' at '{path}' not found" - : $"Entity at '{path}' not found" - ); + 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"); } return current;