On 13.08.2021 09:19, NeilBrown wrote:
On Fri, 13 Aug 2021, Tkaczyk, Mariusz wrote:
Error handling that is buggy, or that is hard to maintain is not better than nothing. If I can't guarantee that we never pass a bad file descriptor, then you cannot guarantee that the error handling has no bugs. Less code generally means less bugs. Any attempt to try to handle an error that should not be able to happen other than crashing is fairly pointless - you cannot guess the real cause, so you cannot know how to repair. Just printing a message and continuing could be as bad as not checking the error. As error handling, I meant any error verification. It doesn't indicate
that we should return status and end gracefully. exit() is elegant solution in this case, totally agree. Thanks, Mariusz