The current error handling can be improved with more specific exception types.
Proposed Changes
- Create a hierarchy of specific exception types
- Add detailed error information in exceptions
- Implement proper validation and error messages
- Improve error logging throughout the codebase
Benefits
- Makes error handling more straightforward for library users
- Improves debugging experience
- Provides more specific error information