this post was submitted on 10 Mar 2025
8 points (90.0% liked)

Programming

18944 readers
279 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] killeronthecorner@lemmy.world 1 points 6 days ago (1 children)

In go you can call, debug.Stack() at any time to get a stack trace. And it's trivial to build error handling wrappers that can do this for on logging of an error.

[โ€“] atzanteol@sh.itjust.works 0 points 6 days ago

You will get the stack at the point of your 'debug.Stack()' call though, not where the error happened.

I'm leaning go, and starting to get used to it, but the error handling is just obnoxious. The constant "if err != nil" makes reading the actual logic so much harder. I'm surprised they haven't come up with some syntactical sugar to make it simpler yet, but these devs seem to see it as some sort of "badge of honor" to suffer.