+class BudgetGraphDuplicatePayeesForTask(BudgetGraphError):
+ def __init__(self, bug_id: int, root_bug_id: int, payee1_key: str, payee2_key: str):
+ super().__init__(bug_id, root_bug_id)
+ self.payee1_key = payee1_key
+ self.payee2_key = payee2_key
+
+ def __str__(self):
+ return (f"Budget assigned to multiple aliases of the same person in "
+ f"a single task: bug #{self.bug_id}, budget assigned to both "
+ f"{self.payee1_key!r} and {self.payee2_key!r}")
+
+
+class BudgetGraphIncorrectRootForMilestone(BudgetGraphError):
+ def __init__(self, bug_id: int, milestone: str, milestone_canonical_bug_id: int):
+ super().__init__(bug_id, bug_id)
+ self.milestone = milestone
+ self.milestone_canonical_bug_id = milestone_canonical_bug_id
+
+ def __str__(self):
+ return (f"Bug #{self.bug_id} is not the canonical root bug for "
+ f"assigned milestone {self.milestone!r} but has no parent "
+ f"bug set: the milestone's canonical root bug is "
+ f"#{self.milestone_canonical_bug_id}")
+
+