Stack traces: Difference between revisions

PascalABC.NET
(Update Lang example: Names are now visible for partially called combinator functions)
(PascalABC.NET)
 
(3 intermediate revisions by 3 users not shown)
Line 622:
=={{header|Elena}}==
{{trans|C#}}
ELENA 56.0x :
<syntaxhighlight lang="elena">import extensions;
Line 650:
{{out}}
<pre>
mytestsandbox'program.inner[01]:testsandbox.l(7)
mytestsandbox'program.middle[01]:testsandbox.l(12)
mytestsandbox'program.outer[01]:testsandbox.l(17)
mytestsandbox'program.function:#invoke[0]:testsandbox.l(23)
system'$private'entry.function:#invoke[0]:win32_appapp.l(375)
system'$private'entrySymbol#startUpsym:win32_appapp.l(5544)
</pre>
 
Line 1,167:
</syntaxhighlight>
{{out}}
The file paths were redacted. If ":x" is outputted as the line number, no line number information is available (e.g. If langLang is implemented with an interpreter, predefined functions are written in the host language)
<pre>
F2:
Line 1,578:
Output:
[[File:Oz_stacktrace2.png|center|Stack trace created by the Debug module.]]
 
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="perl">
procedure qqq;
begin
var st := new System.Diagnostics.StackTrace();
Print(st);
end;
 
procedure ppp;
begin
qqq;
end;
 
begin
ppp
end.
</syntaxhighlight>
{{out}}
<pre>
at Rosetta_StackTrace.Program.qqq()
at Rosetta_StackTrace.Program.ppp()
at Rosetta_StackTrace.Program.$Main()
at Rosetta_StackTrace.Program.Main()
</pre>
 
 
 
=={{header|Perl}}==
Line 2,262 ⟶ 2,289:
 
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.
<syntaxhighlight lang="ecmascriptwren">var func2 = Fn.new {
Fiber.abort("Forced error.")
}
246

edits