Stack traces: Difference between revisions
J: include an example
(→{{header|Go}}: Marked incomplete as a sample of the output is not shown) |
(J: include an example) |
||
Line 615:
See also: http://www.jsoftware.com/help/dictionary/dx013.htm
Example:
<lang j> f=:g
g=:13!:13 bind ''
f 0 NB. no stack trace because debugging has not been enabled
13!:0]1
f 0
┌─┬─┬─┬─┬─────────────┬┬───┬──┬─┐
│g│0│0│3│13!:13@(''"_)││┌─┐│ │ │
│ │ │ │ │ │││0││ │ │
│ │ │ │ │ ││└─┘│ │ │
├─┼─┼─┼─┼─────────────┼┼───┼──┼─┤
│f│0│0│3│g ││┌─┐│ │ │
│ │ │ │ │ │││0││ │ │
│ │ │ │ │ ││└─┘│ │ │
└─┴─┴─┴─┴─────────────┴┴───┴──┴─┘</lang>
Technical note: the stack trace is not displayed, here, until after the stack has been discarded. This is because we have returned the stack trace as a result and relied on J's implicit display of the result of an expression to display the stack trace.
=={{header|Java}}==
|