From f9f142bfb8150d2dc0026e6394bc1e72fe2f5912 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Fri, 13 Jul 2018 11:49:03 -0400 Subject: [PATCH] Throw an aggregate exception if both alpha and bravo servers fail to start --- src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs index d41b375a8a..add29a5cf6 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs @@ -404,7 +404,7 @@ namespace Tgstation.Server.Host.Components.Watchdog bravoServer = await bravoServerTask.ConfigureAwait(false); alphaServer = await alphaServerTask.ConfigureAwait(false); } - catch + catch (Exception e) { if (alphaServerTask != null) if (alphaServerTask.Status == TaskStatus.RanToCompletion) @@ -416,7 +416,10 @@ namespace Tgstation.Server.Host.Components.Watchdog { alphaServer = await alphaServerTask.ConfigureAwait(false); } - catch { } + catch (Exception e2) + { + throw new AggregateException(e, e2); + } } throw; }