Skip to content

Commit

Permalink
Remove utterly unnecessary catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Hosch250 committed Jul 20, 2015
1 parent 954260a commit 9f143ff
Showing 1 changed file with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,14 @@ private async void Refresh()
Control.EnableRefresh(false);
Control.Cursor = Cursors.WaitCursor;

try
await Task.Run(() => RefreshAsync(token), token);
if (_results != null)
{
await Task.Run(() => RefreshAsync(token), token);
if (_results != null)
{
var results = _results.Select(item => new CodeInspectionResultGridViewItem(item));
var results = _results.Select(item => new CodeInspectionResultGridViewItem(item));

Control.SetContent(new BindingList<CodeInspectionResultGridViewItem>(
_gridViewSort.Sort(results, _gridViewSort.ColumnName,
_gridViewSort.SortedAscending).ToList()));
}
}
catch (TaskCanceledException)
{
Control.SetContent(new BindingList<CodeInspectionResultGridViewItem>(
_gridViewSort.Sort(results, _gridViewSort.ColumnName,
_gridViewSort.SortedAscending).ToList()));
}

Control.SetIssuesStatus(_issues, true);
Expand Down

0 comments on commit 9f143ff

Please sign in to comment.