2016-12-05 23:44:36 +01:00
|
|
|
proc g() =
|
2020-02-17 23:21:07 -08:00
|
|
|
# Writes the current stack trace to stderr.
|
2016-12-05 23:44:36 +01:00
|
|
|
writeStackTrace()
|
2020-02-17 23:21:07 -08:00
|
|
|
# Or fetch the stack trace entries for the current stack trace:
|
|
|
|
|
echo "----"
|
|
|
|
|
for e in getStackTraceEntries():
|
|
|
|
|
echo e.filename, "@", e.line, " in ", e.procname
|
|
|
|
|
|
2016-12-05 23:44:36 +01:00
|
|
|
proc f() =
|
|
|
|
|
g()
|
|
|
|
|
|
|
|
|
|
f()
|