BEP-001: Exception Handling
Leave comments on either
This proposal defines BAML's error handling mechanism: Universal Catch.
The core idea: catch is an operator that attaches to any scope—functions, loops, or expressions—without requiring structural changes to existing code.
Document Structure
| Document | Purpose |
|---|---|
| 00_background.md | Error handling landscape and requirements |
| 01_proposal.md | Universal Catch syntax specification |
| 02_learn.md | Practical guide and FAQ |
| 03_alternatives.md | Rejected designs and rationale |
| 04_tooling.md | IDE and compiler capabilities |
| 05_deviations_from_ts.md | Differences from TypeScript/JavaScript |
| 06_proposal_safe.md | The safe keyword for strict exhaustiveness |
Start with 00_background.md for context, then 01_proposal.md for the syntax.