From 367978967c12d147f0a20edd1d49f08c50165434 Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Fri, 6 Dec 2019 21:25:52 -0600 Subject: [PATCH] GenericExceptions print more detail --- Wabbajack.Common/StatusFeed/Errors/GenericException.cs | 4 ++-- Wabbajack.Common/Utils.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Wabbajack.Common/StatusFeed/Errors/GenericException.cs b/Wabbajack.Common/StatusFeed/Errors/GenericException.cs index b091636c..d20e1949 100644 --- a/Wabbajack.Common/StatusFeed/Errors/GenericException.cs +++ b/Wabbajack.Common/StatusFeed/Errors/GenericException.cs @@ -12,9 +12,9 @@ namespace Wabbajack.Common.StatusFeed.Errors public DateTime Timestamp { get; } = DateTime.Now; - public string ShortDescription => ExtraMessage ?? Exception?.Message; + public string ShortDescription => ExtraMessage == null ? Exception?.Message : $"{ExtraMessage}: {Exception?.Message}"; - public string ExtendedDescription => $"{ExtraMessage}: {Exception?.ToString()}"; + public string ExtendedDescription => ExtraMessage == null ? Exception?.ToString() : $"{ExtraMessage}: {Exception?.ToString()}"; public Exception Exception { get; } diff --git a/Wabbajack.Common/Utils.cs b/Wabbajack.Common/Utils.cs index 1e1ae33c..01ec9c38 100644 --- a/Wabbajack.Common/Utils.cs +++ b/Wabbajack.Common/Utils.cs @@ -64,7 +64,7 @@ namespace Wabbajack.Common public static T Log(T msg) where T : IStatusMessage { - LogToFile(msg.ShortDescription); + LogToFile(msg.ExtendedDescription); LoggerSubj.OnNext(msg); return msg; }