Stack traces: Difference between revisions
Content deleted Content added
→{{header|Nim}}: Move Nim entry to the correct place and added output |
|||
Line 1,222: | Line 1,222: | ||
RStackTraces.inner |
RStackTraces.inner |
||
</pre> |
</pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
# Writes the current stack trace to stderr. |
|||
⚫ | |||
# Or fetch the stack trace entries for the current stack trace: |
|||
echo "----" |
|||
for e in getStackTraceEntries(): |
|||
echo e.filename, "@", e.line, " in ", e.procname |
|||
⚫ | |||
⚫ | |||
⚫ | |||
{{out}} |
|||
For a release build: |
|||
<pre>Traceback (most recent call last) |
|||
stack_traces.nim(12) stack_traces |
|||
stack_traces.nim(10) f |
|||
stack_traces.nim(3) g |
|||
---- |
|||
stack_traces.nim@12 in stack_traces |
|||
stack_traces.nim@10 in f |
|||
stack_traces.nim@6 in g |
|||
</pre> |
|||
In a debug build the stacktrace contains the full path to the source. |
|||
=={{header|Objective-C}}== |
=={{header|Objective-C}}== |
||
Line 1,416: | Line 1,443: | ||
Output: |
Output: |
||
[[File:Oz_stacktrace2.png|center|Stack trace created by the Debug module.]] |
[[File:Oz_stacktrace2.png|center|Stack trace created by the Debug module.]] |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|Perl}}== |
=={{header|Perl}}== |