Tom C inherited some Go from another developer, and writes, “I’m pretty sick of finding this sort of stuff in this code.”
It’s good to log every error- it’ll help in the long run when you’re trying to trace through the problem which happens in production but the program works fine on your machine. This code knows that accessing the logger object is code that can throw an error, so if it gets an error fetching the logger object it… logs the error. With the logger object that returned some kind of error. //thedailywtf.com/images/highlight/highlight.pack.js
[Advertisement]
Forget logs. Next time you’re struggling to replicate error, crash and performance issues in your apps – Think Raygun! Installs in minutes. Learn more.
via Tumblr Representative Line: Log Every Error
0 Comments
Leave a Reply. |
About Us:Dive deep into a topic with Appeared, learning both how and why things work. Come and be a part of our group if you are looking for a collection of articles on software development and computer programming. I am an experienced and enthusiastic computer programmer who prefers high-level languages and simple solutions. Other Profiles:
|