2019-12-05 04:57:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Wabbajack.Common.StatusFeed.Errors
|
|
|
|
|
{
|
|
|
|
|
public class GenericException : IException
|
|
|
|
|
{
|
|
|
|
|
public string ExtraMessage { get; }
|
|
|
|
|
|
|
|
|
|
public DateTime Timestamp { get; } = DateTime.Now;
|
|
|
|
|
|
2019-12-07 03:25:52 +00:00
|
|
|
|
public string ShortDescription => ExtraMessage == null ? Exception?.Message : $"{ExtraMessage}: {Exception?.Message}";
|
2019-12-05 04:57:05 +00:00
|
|
|
|
|
2019-12-07 03:25:52 +00:00
|
|
|
|
public string ExtendedDescription => ExtraMessage == null ? Exception?.ToString() : $"{ExtraMessage}: {Exception?.ToString()}";
|
2019-12-05 04:57:05 +00:00
|
|
|
|
|
|
|
|
|
public Exception Exception { get; }
|
|
|
|
|
|
|
|
|
|
public GenericException(Exception exception, string extraMessage = null)
|
|
|
|
|
{
|
|
|
|
|
ExtraMessage = extraMessage;
|
|
|
|
|
Exception = exception;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|