Skip to content

Commit ea609b9

Browse files
feat: upgrading updater
1 parent 6362372 commit ea609b9

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

src/TwitchStreamingTools/Views/MainWindow.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<SplitView.Pane>
5858
<StackPanel Spacing="5"
5959
Margin="5">
60-
<TextBox Text="{Binding Error}"/>
60+
<TextBox Text="{Binding Error}" />
6161
<Button Command="{Binding OnToggleMenu}">
6262
<PathIcon Data="{StaticResource LineHorizontal3Regular}" />
6363
</Button>

src/TwitchStreamingTools/Views/MainWindow.axaml.cs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#if !DEBUG
2-
using Microsoft.Extensions.DependencyInjection;
3-
#else
4-
using Avalonia;
5-
#endif
61
using System;
72
using System.Linq;
83
using System.Reflection;
@@ -14,6 +9,12 @@
149
using Nullinside.Api.Common.Desktop;
1510

1611
using TwitchStreamingTools.ViewModels;
12+
#if !DEBUG
13+
using Microsoft.Extensions.DependencyInjection;
14+
15+
#else
16+
using Avalonia;
17+
#endif
1718

1819
namespace TwitchStreamingTools.Views;
1920

@@ -52,7 +53,14 @@ protected override void OnInitialized() {
5253
return;
5354
}
5455

55-
fuck.Error = t.Exception?.Message ?? "No error message was provided.";
56+
string message = "No error message was provided.";
57+
if (null != t.Exception) {
58+
message = t.Exception.Message;
59+
message += "|";
60+
message += t.Exception.StackTrace;
61+
}
62+
63+
fuck.Error = message;
5664
});
5765
});
5866
return;
@@ -92,16 +100,14 @@ protected override void OnInitialized() {
92100

93101
vm.LocalVersion = localVersion;
94102
Dispatcher.UIThread.Post(async void () => {
95-
try
96-
{
103+
try {
97104
var versionWindow = new NewVersionWindow {
98105
DataContext = vm
99106
};
100107

101108
await versionWindow.ShowDialog(this);
102109
}
103-
catch
104-
{
110+
catch {
105111
// do nothing, don't crash
106112
}
107113
});

src/nullinside-api

0 commit comments

Comments
 (0)