Improve error handling and exception management in your code
Review and improve the exception handling in my {{LANGUAGE}} code.
**Current code with exception handling:**
```{{LANGUAGE}}
{{CODE}}
```
**Types of errors I need to handle:**
{{ERROR_TYPES}}
**Current problems with error handling:**
{{PROBLEMS}}
Please provide:
1. **Exception Handling Audit**: Review current try-catch blocks and error handling
2. **Anti-Pattern Identification**: Point out exception handling anti-patterns
3. **Improved Implementation**: Rewrite with proper exception handling
4. **Custom Exception Design**: Suggest custom exception classes if needed
5. **Error Recovery Strategies**: Implement appropriate recovery mechanisms
6. **Logging Integration**: Add proper error logging
7. **User-Friendly Messages**: Create meaningful error messages for end usersOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{LANGUAGE][{CODE][{ERROR_TYPES][{PROBLEMS]