(no title)
danielparks | 4 years ago
I’ve seen the “clean up errors yourself” argument before, but, like the author, I don’t think it holds water. Often the correct response to errors is to panic() or pass it up the stack so the caller can deal with it or—more likely—panic() itself.
Zababa|4 years ago
dnautics|4 years ago
Gaelan|4 years ago
randyrand|4 years ago
tored|4 years ago
Unfortunately most common languages does not prioritize this. As a contractor I have dug myself thru a lot of awful code in different languages and the most common denominator is improper error handling.
ksec|4 years ago
>He posted a follow up about error handling......
When I was reading the original blog I was thinking if he had any follow up, so I decide to click on archive and the homepage. And this article, somehow doesn't show up in both list. As a matter of fact I couldn't even find how to get to this blog post without your direct linking. Then it turns out it is a "FUTURE POSTS".
How does that work and why? Is this suppose to be some sort of preview before it is officially published?
ayende|4 years ago
danielparks|4 years ago
The author posted the link in the comments of the original post.
randyrand|4 years ago
Handling Errors causes us developers so confusion, because we are so used to exceptions and how poorly they were conceived.
Errors should be called Failures. It's just when a function fails to so what it says it does. Nothing more, nothing special about it!
If you call fopen() and it doesn't find the file, that's a Failure! No reason to panic! Just go create the file!