[/F] > any reason you can't just throw OSError exceptions? [Mark] > Mainly cos the error numbers are different - (eg, compare "errno.h" with > "winerror.h" OSError really should be named CRTError. There's nothing to stop a new CRTError class being derived from OSError, leaving OSError platform-neutral. This would just be vanilla OO refactoring in the face of new requirements, and existing code wouldn't know the difference. You should subclass from OSError so that code that cares about portability can catch OSError specifically instead of needing to be modified every time someone with a new OS wants to add a class of error specific to that OS. > I dont think it makes much sense to have 2 different error numbering > schemes use the same exception... No, I agree that does not. But it makes perfect sense for a subclass to override its parent's numbering scheme (and even more sense to make "numbering scheme" an abstract property of the parent to be implemented by its subclasses).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4