Skip to content

Commit

Permalink
Catch exception that should not ever happen
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkl58 committed Jan 28, 2024
1 parent 19f1bf2 commit 0537963
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NotEnoughAV1Encodes/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,10 @@ public async void PreStart()
await MainStartAsync(cancellationTokenSource.Token);
}
catch (OperationCanceledException) { }
catch (Exception ex)
{
MessageBox.Show("This should not have happened. Exception: " + ex.Message + "\n" + ex.StackTrace, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}

// Dispose Cancellation Source after Main Function finished
cancellationTokenSource.Dispose();
Expand Down

0 comments on commit 0537963

Please sign in to comment.