Skip to content

Commit 82b366c

Browse files
committed
1 parent 897a4e5 commit 82b366c

File tree

6 files changed

+38
-10
lines changed

6 files changed

+38
-10
lines changed

v2rayN/v2rayN.Desktop/App.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionE
4343
{
4444
if (e.ExceptionObject != null)
4545
{
46-
Logging.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject!);
46+
Logging.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject);
4747
}
4848
}
4949

v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,16 @@ private void BtnAutofitColumnWidth_Click(object? sender, RoutedEventArgs e)
5252

5353
private void AutofitColumnWidth()
5454
{
55-
foreach (var it in lstConnections.Columns)
55+
try
5656
{
57-
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
57+
foreach (var it in lstConnections.Columns)
58+
{
59+
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
60+
}
61+
}
62+
catch (Exception ex)
63+
{
64+
Logging.SaveLog("ClashConnectionsView", ex);
5865
}
5966
}
6067

v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,16 @@ private void BtnAutofitColumnWidth_Click(object? sender, RoutedEventArgs e)
345345

346346
private void AutofitColumnWidth()
347347
{
348-
foreach (var it in lstProfiles.Columns)
348+
try
349349
{
350-
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
350+
foreach (var it in lstProfiles.Columns)
351+
{
352+
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
353+
}
354+
}
355+
catch (Exception ex)
356+
{
357+
Logging.SaveLog("ProfilesView", ex);
351358
}
352359
}
353360

v2rayN/v2rayN/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionE
5656
{
5757
if (e.ExceptionObject != null)
5858
{
59-
Logging.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject!);
59+
Logging.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject);
6060
}
6161
}
6262

v2rayN/v2rayN/Views/ClashConnectionsView.xaml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,16 @@ private void BtnAutofitColumnWidth_Click(object sender, RoutedEventArgs e)
5555

5656
private void AutofitColumnWidth()
5757
{
58-
foreach (var it in lstConnections.Columns)
58+
try
5959
{
60-
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
60+
foreach (var it in lstConnections.Columns)
61+
{
62+
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
63+
}
64+
}
65+
catch (Exception ex)
66+
{
67+
Logging.SaveLog("ClashConnectionsView", ex);
6168
}
6269
}
6370

v2rayN/v2rayN/Views/ProfilesView.xaml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,16 @@ private void BtnAutofitColumnWidth_Click(object sender, RoutedEventArgs e)
323323

324324
private void AutofitColumnWidth()
325325
{
326-
foreach (var it in lstProfiles.Columns)
326+
try
327327
{
328-
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
328+
foreach (var it in lstProfiles.Columns)
329+
{
330+
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
331+
}
332+
}
333+
catch (Exception ex)
334+
{
335+
Logging.SaveLog("ProfilesView", ex);
329336
}
330337
}
331338

0 commit comments

Comments
 (0)