News for hackers. Stuff that matters.
Re:Why would you still want to use strace in 2023? [video] by gpderetta on Monday January 08, 2024 @03:09PM (#38917400)
Exactly! Throwing away the call stack before deciding how to handle the error is not ideal.
Re:Why would you still want to use strace in 2023? [video] by angra_mainyu on Thursday January 11, 2024 @01:34PM (#38956545)
I've honestly never needed it when dealing an error, the fact that errors are handled near where they occur means a stack is rarely needed.

If you bubble up errors a lot then errors.Is/As is made for that purpose.

You really only care about a stack trace with a panic.

In anycase, runtime.Stack() iirc should return the stack.

But this sounds more like trying to write other languages in Go rather than writing in Go.