-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.py
More file actions
24 lines (13 loc) · 786 Bytes
/
Copy patherrors.py
File metadata and controls
24 lines (13 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Custom domain exceptions for maintenance_tracker.
Exceptions represent control-flow error conditions (not-found, duplicates, dangling dependencies).
"""
class MaintenanceTrackerError(Exception):
"""Base class for tracker-related exceptions."""
class TaskNotFoundError(MaintenanceTrackerError):
"""Raised when a task referenced by name does not exist."""
class DuplicateTaskError(MaintenanceTrackerError):
"""Raised when attempting to register a task with a name that already exists."""
class ActionNotFoundError(MaintenanceTrackerError):
"""Raised when attempting to operate on an action that does not exist."""
class DanglingActionsError(MaintenanceTrackerError):
"""Raised when attempting to delete/replace a task that still has actions attached."""