digitalmars.D - errno the ugly duckling
- Tove (18/18) Dec 06 2019 Exceptions
Exceptions + Best solution for rare errors Expected!Andrei + Best general error-handling mechanism No matter which error camp you belong to, errno is universally scorned. Before TLS support became ubiquitous, global errno was useless, with TLS it's no longer a real problem, now can we improve errno even futher? Exception last_error; // TLS & Rich error info LastExceptionWhichOccuredOnThisThread + Zero-cost in hot-path + Decent performance in error-path (Better than Exceptions) - No support for fibers - Not pure I'm not claming this is the best general error-handling mechanism, it's not suitable for a standard library etc. I'm just wondering, does this fill a niche for certain libraries.
Dec 06 2019