obviously the errno should have been obtained at the time of failure and included in the exception, maybe using a simple subclass of std exception. trying to compute information about the failure at handling time is just stupid.
> I am flabbergasted by the naivety around predicting the future. While we have hints and suggestions, our predictions are best expressed as ranges of possibilities with varying weights. The hyperbolic among us like to pretend that predictions come in the form of precise lines of predetermined direction and curve; how foolish!
I dont see why the latter is any more foolish than the former.
It’s a matter of correctness and utility. You can improve your odds of correctness (and thus usefulness) by adjusting the scope of your projection.
This applies not only to predicting the future. Consider measuring something: you carefully choose your level of precision for practical reasons. Consider goal setting: you leave abundant room for variation because your goal is not expressed in hyper narrow terms, but you don’t leave it so loose that you don’t know what steps to take.
When expressed in sufficiently narrow terms, no one will ever predict anything. When expressed in sufficiently broad terms, everyone can predict everything. So the point is to modulate the scope until attaining utility.