From a356071f4188496fea5f31302182573f18aa85a1 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Tue, 20 Sep 2022 08:01:33 +1200 Subject: [PATCH] Use IRuntimeLog in ConstructionSystem (#11413) --- .../Construction/ConstructionSystem.Interactions.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Content.Server/Construction/ConstructionSystem.Interactions.cs b/Content.Server/Construction/ConstructionSystem.Interactions.cs index 0579971438..04f3c09ae7 100644 --- a/Content.Server/Construction/ConstructionSystem.Interactions.cs +++ b/Content.Server/Construction/ConstructionSystem.Interactions.cs @@ -7,12 +7,18 @@ using Content.Shared.Construction.Steps; using Content.Shared.Database; using Content.Shared.Interaction; using Robust.Shared.Containers; +#if EXCEPTION_TOLERANCE +using Robust.Shared.Exceptions; +#endif namespace Content.Server.Construction { public sealed partial class ConstructionSystem { [Dependency] private readonly IAdminLogManager _adminLogger = default!; +#if EXCEPTION_TOLERANCE + [Dependency] private readonly IRuntimeLog _runtimeLog = default!; +#endif private readonly HashSet _constructionUpdateQueue = new(); @@ -474,7 +480,8 @@ namespace Content.Server.Construction } catch (Exception e) { - _sawmill.Error($"Caught exception while processing construction queue. Entity {ToPrettyString(uid)}, graph: {construction.Graph}, exception: {e}"); + _sawmill.Error($"Caught exception while processing construction queue. Entity {ToPrettyString(uid)}, graph: {construction.Graph}"); + _runtimeLog.LogException(e, $"{nameof(ConstructionSystem)}.{nameof(UpdateInteractions)}"); Del(uid); } #endif