Implements pending future tracking in async.

This commit is contained in:
Dominik Picheta 2019-05-05 21:33:25 +01:00
commit abe634aefe
3 changed files with 75 additions and 3 deletions

View file

@ -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.} =