News for hackers. Stuff that matters.
Re:One Year After Switching from Java to Go: Our Experiences by mukunda_johnson on Tuesday February 18, 2025 @10:15PM (#43098162)
I prefer stack traces in errors. It's gives so much more automatically so you don't have to worry about manual annotation. Stack traces and debug logs are the way to go. I like to use panics for exceptional conditions just for the convenient escape with the stack trace.
Re:One Year After Switching from Java to Go: Our Experiences by ignoramous on Wednesday February 19, 2025 @01:54AM (#43099348)
> I like to use panics for exceptional conditions just for the convenient escape with the stack trace.

One can debug.PrintStack(), instead.

https://pkg.go.dev/runtime/debug#PrintStack