GenericExceptions print more detail

This commit is contained in:
Justin Swanson 2019-12-06 21:25:52 -06:00
parent 729b5128da
commit 367978967c
2 changed files with 3 additions and 3 deletions

View File

@ -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; }

View File

@ -64,7 +64,7 @@ namespace Wabbajack.Common
public static T Log<T>(T msg) where T : IStatusMessage
{
LogToFile(msg.ShortDescription);
LogToFile(msg.ExtendedDescription);
LoggerSubj.OnNext(msg);
return msg;
}