-
Notifications
You must be signed in to change notification settings - Fork 1
Validation
Daniel Mackay [SSW] edited this page Apr 30, 2023
·
2 revisions
Add specific domain exception for each validation error. This is the most explicit, but also the most verbose.
- Pros
- Defensive
- Stack Trace
- Easier Debugging
- Cons
- Performance
Wrapper containing Error message, code, success/fail, etc
- Pros
- Expressiveness
- Performance
- Self-documenting errors
- Cons
- Verbose
- Need to sprinkle error handling code throughout your application
- Messy for Deeply nested code
- No stack trace