logoalt Hacker News

jeroenhd • today at 1:22 PM • 0 replies • view on HN

It's not even C, most of the Windows API solves this problem by operating on handles error codes are clear and error checking becomes easier (though it still goes wrong). Good old winerror even has bit patterns to see what sort of error you're dealing with.

The Unix flavour of C, which relies on passing magical numbers, is making C's lack of proper error handling patterns a lot worse.