diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-09-09 01:16:28 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-09-09 01:16:28 +0100 |
commit | dd33069d593878e0e7c073ca3ef81157e105667c (patch) | |
tree | 4f5bcec4b3ec272b4d89d34cf45bd7a7d39081a6 /lib/system.nim | |
parent | 6689fa68f5ee3868b128b308cb237be5c4aa5d98 (diff) | |
download | Nim-dd33069d593878e0e7c073ca3ef81157e105667c.tar.gz |
Implements getCurrentException for try in async procs. Ref #1487.
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index 9153af16c..ad99306ad 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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" |