summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-05-08 20:37:31 +0200
committerGitHub <noreply@github.com>2019-05-08 20:37:31 +0200
commitaa768574620c46b1ecc4c63f202a4fdb24c4b3f1 (patch)
tree1cb9a419f4488466231b242c654211a8a13ab6b2 /lib/system
parent641e8f596c6bfd005e6677b2faeb90dce513adb0 (diff)
parentabe634aefe555ce40b18104addb4d44204c27114 (diff)
downloadNim-aa768574620c46b1ecc4c63f202a4fdb24c4b3f1.tar.gz
Merge pull request #11181 from nim-lang/pending-future-tracking
Implements pending future tracking in async.
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/excpt.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index b421d9650..b59840f77 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -445,6 +445,12 @@ proc getStackTraceEntries*(e: ref Exception): seq[StackTraceEntry] =
   else:
     result = move(e.trace)
 
+proc getStackTraceEntries*(): seq[StackTraceEntry] =
+  ## Returns the stack trace entries for the current stack trace.
+  ## This is not yet available for the JS backend.
+  when hasSomeStackTrace:
+    rawWriteStackTrace(result)
+
 const nimCallDepthLimit {.intdefine.} = 2000
 
 proc callDepthLimitReached() {.noinline.} =