Skip to content

Commit

Permalink
- Stop Github code analysis complaining about unused captured excepti…
Browse files Browse the repository at this point in the history
…ons (#466)
  • Loading branch information
nwithan8 committed May 10, 2023
1 parent ffb781e commit 31bd064
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/AddressServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Addresses[0].Id, nextPageCollection.Addresses[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/EventServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Events[0].Id, nextPageCollection.Events[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/InsuranceServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Insurances[0].Id, nextPageCollection.Insurances[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/PickupServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Pickups[0].Id, nextPageCollection.Pickups[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.ReferralCustomers[0].Id, nextPageCollection.ReferralCustomers[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/RefundServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Refunds[0].Id, nextPageCollection.Refunds[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/ReportServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Reports[0].Id, nextPageCollection.Reports[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/ScanFormServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.ScanForms[0].Id, nextPageCollection.ScanForms[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/ShipmentServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Shipments[0].Id, nextPageCollection.Shipments[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/ServicesTests/TrackerServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public async Task TestGetNextPage()
// If the first ID in the next page is the same as the first ID in the current page, then we didn't get the next page
Assert.NotEqual(collection.Trackers[0].Id, nextPageCollection.Trackers[0].Id);
}
catch (EndOfPaginationError e) // There's no second page, that's not a failure
catch (EndOfPaginationError) // There's no second page, that's not a failure
{
Assert.True(true);
}
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.Tests/_Utilities/Assertions/CollectionAsserts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void Any<T>(IEnumerable<T> collection, Action<T, int> action)
passed = true;
break; // if we get here, we passed, so we can stop iterating
}
catch (Exception ex)
catch (Exception)
{
// we don't care about the exception, we just want to keep iterating
}
Expand Down

0 comments on commit 31bd064

Please sign in to comment.