From 3a0f45c46276efeea1eb6f4ebda23b84ecea8035 Mon Sep 17 00:00:00 2001 From: sabihoshi Date: Tue, 11 May 2021 18:22:25 +0800 Subject: [PATCH] Show Exception type as the title in ErrorContentDialog --- GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj | 2 +- .../ModernWPF/Errors/ErrorContentDialog.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj index 759ae4b..e0581ad 100644 --- a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj +++ b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj @@ -6,7 +6,7 @@ true GenshinLyreMidiPlayer.WPF.App app.manifest - 1.9.4 + 1.9.5 item_windsong_lyre.ico enable https://github.com/sabihoshi/GenshinLyreMidiPlayer diff --git a/GenshinLyreMidiPlayer.WPF/ModernWPF/Errors/ErrorContentDialog.cs b/GenshinLyreMidiPlayer.WPF/ModernWPF/Errors/ErrorContentDialog.cs index 8a6cf0f..f0e9706 100644 --- a/GenshinLyreMidiPlayer.WPF/ModernWPF/Errors/ErrorContentDialog.cs +++ b/GenshinLyreMidiPlayer.WPF/ModernWPF/Errors/ErrorContentDialog.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Humanizer; @@ -10,7 +10,7 @@ public class ErrorContentDialog : ContentDialog { public ErrorContentDialog(Exception e, IReadOnlyCollection? options = null, string? closeText = null) { - Title = e.Message; + Title = e.GetType(); Content = e; PrimaryButtonText = options?.ElementAtOrDefault(0)?.Humanize();