Commit 4e917e8
committed
Address PR feedback: improve exception handling and use LINQ
- Add System.Linq import for LINQ extension methods
- Replace empty catch block with comment explaining expected cancellation
- Add exception filters to generic catch clauses to allow fatal exceptions
(OutOfMemoryException, StackOverflowException) to propagate
- Replace generic catch blocks in DisposeAsync with specific exception types
(SnsNotFoundException, QueueDoesNotExistException, AmazonServiceException)
- Refactor ValidateQueueName to use LINQ FirstOrDefault instead of foreach
- Refactor PolicyContainsStatement to use LINQ Any instead of foreach
- Replace inefficient ContainsKey + indexer with TryGetValue in tests1 parent 678a05f commit 4e917e8
File tree
2 files changed
+26
-22
lines changed- src/Foundatio.AWS/Messaging
- tests/Foundatio.AWS.Tests/Messaging
2 files changed
+26
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
401 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
| |||
524 | 528 | | |
525 | 529 | | |
526 | 530 | | |
527 | | - | |
528 | 531 | | |
529 | 532 | | |
530 | 533 | | |
| |||
700 | 703 | | |
701 | 704 | | |
702 | 705 | | |
703 | | - | |
| 706 | + | |
704 | 707 | | |
705 | 708 | | |
706 | 709 | | |
| |||
712 | 715 | | |
713 | 716 | | |
714 | 717 | | |
715 | | - | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
716 | 723 | | |
717 | | - | |
| 724 | + | |
718 | 725 | | |
719 | 726 | | |
720 | 727 | | |
| |||
724 | 731 | | |
725 | 732 | | |
726 | 733 | | |
727 | | - | |
| 734 | + | |
728 | 735 | | |
729 | | - | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
730 | 741 | | |
731 | 742 | | |
732 | 743 | | |
| |||
764 | 775 | | |
765 | 776 | | |
766 | 777 | | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
772 | 781 | | |
773 | 782 | | |
774 | 783 | | |
| |||
818 | 827 | | |
819 | 828 | | |
820 | 829 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
| 830 | + | |
827 | 831 | | |
828 | 832 | | |
829 | 833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
487 | | - | |
| 486 | + | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
0 commit comments