Implements getCurrentException for try in async procs. Ref #1487.

This commit is contained in:
Dominik Picheta 2014-09-09 01:16:28 +01:00
commit dd33069d59
3 changed files with 20 additions and 7 deletions

View file

@ -2630,6 +2630,12 @@ when not defined(JS): #and not defined(NimrodVM):
excHandler.hasRaiseAction = true
excHandler.raiseAction = action
proc setCurrentException*(exc: ref Exception) {.inline, gcsafe.} =
## sets the current exception.
##
## **Warning**: Only use this if you know what you are doing.
currException = exc
{.push stack_trace: off, profiler:off.}
when defined(endb) and not defined(NimrodVM):
include "system/debugger"