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.