result-pattern
Installation
SKILL.md
Result Pattern Implementation
Overview
The Result pattern provides explicit error handling without exceptions:
- No exceptions for business errors - Exceptions for truly exceptional cases only
- Explicit success/failure - Compiler forces handling of both cases
- Composable errors - Chain operations, fail fast
- Self-documenting - Method signatures show possible outcomes
Quick Reference
| Type | Purpose | Usage |
|---|---|---|
Result |
Operation without return value | Update, Delete operations |
Result<T> |
Operation with return value | Create, Get operations |
Error |
Error information | Code + Description |