Skip to content

Commit

Permalink
Use exception filter instead of catch if throw.
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgi committed Mar 19, 2016
1 parent 52766e0 commit 34a1b54
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,8 @@ protected override DbCommand CreateCommand(IQueryable queryable)
{
var result = queryable.Provider.Execute(queryable.Expression);
}
catch (Exception ex)
catch (Exception ex) when (ex is CommandCapturedException || ex.InnerException is CommandCapturedException)
{
if (ex is CommandCapturedException || ex.InnerException is CommandCapturedException)
{
// ignore
}
else
{
throw;
}
}
finally
{
Expand Down

0 comments on commit 34a1b54

Please sign in to comment.