Commit 59dd823
committed
Avoid repetition on error handling
We group the repeated code in one place to make it more clear that the
code for all error paths is the same, except for the logging.
We also update the set in-place instead of creating a new one on every
iteration.
Signed-off-by: Leandro Lucarella <[email protected]>1 parent fbf2f47 commit 59dd823
File tree
1 file changed
+6
-8
lines changed- src/frequenz/sdk/actor/power_distributing/_component_managers
1 file changed
+6
-8
lines changedLines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| 655 | + | |
655 | 656 | | |
656 | 657 | | |
| 658 | + | |
657 | 659 | | |
658 | | - | |
659 | | - | |
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
667 | | - | |
668 | 666 | | |
669 | 667 | | |
670 | 668 | | |
671 | 669 | | |
672 | 670 | | |
673 | 671 | | |
674 | | - | |
675 | | - | |
676 | 672 | | |
677 | 673 | | |
678 | 674 | | |
679 | 675 | | |
680 | 676 | | |
681 | 677 | | |
682 | | - | |
683 | | - | |
684 | 678 | | |
685 | 679 | | |
686 | 680 | | |
687 | 681 | | |
688 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
689 | 687 | | |
690 | 688 | | |
691 | 689 | | |
| |||
0 commit comments