logoalt Hacker News

DangitBobbylast Wednesday at 4:04 PM1 replyview on HN

Stack traces are not so long that you can't find the information you need in them, and actually just like go in some languages you can elect to add context to your stack trace (e.g. in python by raising an error from another error).

My experience in go was opposite of yours. The original devs (who were long gone) provided no information at all at the error site and I felt lucky even to find the place in the code that produced the error. Unfortunately the "force you to handle errors" idea, while well intentioned, doesn't "force you to provide useful error handling information", making it worse than stack traces by default.


Replies

danenanialast Wednesday at 4:24 PM

You're right that its usefulness is contingent on adding helpful context to errors. Without that, I might agree that stack traces are better.