diff --git a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs index 617cdb2ea0..ef79c301f5 100644 --- a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs +++ b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Runtime.ExceptionServices; using System.Threading; using Content.Server.AI.Operators; using Content.Server.AI.Utility.Actions; @@ -137,6 +138,9 @@ namespace Content.Server.AI.Utility.AiLogic break; default: Logger.FatalS("ai", _actionRequest.Exception.ToString()); + ExceptionDispatchInfo.Capture(_actionRequest.Exception).Throw(); + // The code never actually reaches here, because the above throws. + // This is to tell the compiler that the flow never leaves here. throw _actionRequest.Exception; } var action = _actionRequest.Result;