summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2019-05-05 21:33:25 +0100
committerDominik Picheta <dominikpicheta@gmail.com>2019-05-06 17:18:30 +0100
commitabe634aefe555ce40b18104addb4d44204c27114 (patch)
tree9e180d263cfb14f824415b3ea128bce910da6911 /lib/system
parent9c3e23e0751881b16fab813fd3c2edc1b98b7f68 (diff)
downloadNim-abe634aefe555ce40b18104addb4d44204c27114.tar.gz
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.} =