News for hackers. Stuff that matters.
Re:Code boilerplate: Is it always bad? by qb45 on Saturday June 10, 2017 @12:30PM (#14527924)
Sometimes when I'm being very lazy writing C, I define a macro of this kind which doesn't even take any error message argument but just prints line number, textual representation of the code which failed and errno. Huge debugging aid at negligible cost.
Re:Code boilerplate: Is it always bad? by combatentropy on Saturday June 10, 2017 @01:48PM (#14528297)
Oh, well, Apache and PHP give me this out of the box. So even though there is not a great deal of custom error checking in my code as I said before, I always have enough information in Apache's logs to track down the problem. I guess with C and Go you have to roll your own.