I.e. if you open a resource then you should do it in a try-finally block (or its analog). In C++ you should wrap in automatic object.
Error codes, on the other hand, promote sloppy design. Certain error codes are almost always ignored, like printf() return result (do you know that it can be used to process SIGINT gracefully?) or close().
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds