Module 8: Exception Handling and Debugging
Creating Custom Exceptions
Model domain-specific failures with meaningful exception types and metadata.
Extend Exception (checked) or RuntimeException (unchecked) depending on caller expectations.
Include contextual fields (e.g., orderId) and override toString for more actionable logs.
Document recovery expectations: when should callers retry, notify users, or escalate?