diff --git a/Warning.cs b/Warning.cs index 75096ca..1ca66c3 100644 --- a/Warning.cs +++ b/Warning.cs @@ -6,18 +6,19 @@ using System.Globalization; using System.Threading.Tasks; using JetBrains.Annotations; - using Microsoft.HockeyApp; + using Microsoft.AppCenter.Crashes; public static class WarningExtensions { public static void ReportAsWarning(this Exception exception, string prefix = "Warning: ") { if (exception != null) { - string message = prefix + exception.Message; - HockeyClient.Current.TrackTrace(message, SeverityLevel.Warning, properties: new SortedDictionary { + Crashes.TrackError(exception, properties: new SortedDictionary { [nameof(exception.StackTrace)] = exception.StackTrace, [nameof(exception.Source)] = exception.Source, [nameof(exception.HResult)] = exception.HResult.ToString(CultureInfo.InvariantCulture), [nameof(exception.InnerException)] = exception.InnerException?.ToString(), + ["IsWarning"] = "true", + ["Prefix"] = prefix, }); } } diff --git a/WindowManagement.csproj b/WindowManagement.csproj index 726cb10..088c909 100644 --- a/WindowManagement.csproj +++ b/WindowManagement.csproj @@ -9,8 +9,8 @@ - +