Stack traces: Difference between revisions

Added Wren
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(Added Wren)
Line 2,068:
=={{header|VBA}}==
In VBE the VBA Editor hitting Control+L while stepping through your code in debug mode will pop up a window which displays the call stack.
 
=={{header|Wren}}==
You can always force Wren CLI to produce a stack trace by either engineering an actual error or calling Fiber.abort() at the relevant part of the script.
 
However, it is not possible to continue execution of the script afterwards. Whilst one can 'catch' such an error using Fiber.try() this will only allow you to inspect the error itself, not the chain of function calls that led up to it.
<lang ecmascript>var func2 = Fn.new {
Fiber.abort("Forced error.")
}
 
var func1 = Fn.new {
func2.call()
}
 
func1.call()</lang>
 
{{out}}
<pre>
Forced error.
[./stack_trace line 2] in new(_) block argument
[./stack_trace line 6] in new(_) block argument
[./stack_trace line 9] in (script)
</pre>
 
=={{header|zkl}}==
9,490

edits