Stack traces: Difference between revisions

no edit summary
No edit summary
Line 539:
 
=={{header|Go}}==
{{incomplete|Go|A sample of the output is not shown.}}
<lang go>import "runtime/debug"
// ...
Line 547 ⟶ 546:
// alternately to get it in a variable:
var stackTrace string = string(debug.Stack())</lang>
 
outputs:
/home/foo/test/test.go:12 (0x8048c26)
main: debug.PrintStack()
/home/foo/go/hg/src/pkg/runtime/386/asm.s:93 (0x8049b72)
mainstart: CALL main·main(SB)
/home/foo/go/hg/src/pkg/runtime/proc.c:149 (0x80531de)
goexit: runtime·goexit(void)
 
==Icon and {{header|Unicon}}==
Anonymous user