Hacker News new | ask | show | jobs
by david-gpu 124 days ago
Right, but as a programmer you rarely have control over that. And even if you do, you often can't handle out of memory errors gracefully.

Thus, for a typical situation it is reasonable to log the error and bail out, rather than adding extra custom error handling around every single memory allocation, which ends up being code that is never tested.