summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-11-05 19:48:49 +0100
committerAraq <rumpf_a@web.de>2012-11-05 19:48:49 +0100
commite54425b068f57bedaba3f15ff2c843d8570527ad (patch)
treecb8871df295cbe15577cc5692a41dbe35aaa77b3 /lib/system.nim
parent865d9cc6e6df872f7fa1a32536a3ae42c0384d51 (diff)
downloadNim-e54425b068f57bedaba3f15ff2c843d8570527ad.tar.gz
system.onRaise improvements
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-xlib/system.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 579cbbc58..b4e552701 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1941,6 +1941,7 @@ when not defined(EcmaScript) and not defined(NimrodVM):
       prev: PSafePoint # points to next safe point ON THE STACK
       status: int
       context: C_JmpBuf
+      hasRaiseAction: bool
       raiseAction: proc (e: ref E_Base): bool {.closure.}
   
   when defined(initAllocator):
@@ -2047,7 +2048,9 @@ when not defined(EcmaScript) and not defined(NimrodVM):
       ## raise an exception but instead calls ``action``.
       ## If ``action`` returns false, the exception has been handled and
       ## does not propagate further through the call stack.
-      if not isNil(excHandler): excHandler.raiseAction = action
+      if not isNil(excHandler):
+        excHandler.hasRaiseAction = true
+        excHandler.raiseAction = action
 
   {.push stack_trace: off, profiler:off.}
   when defined(endb):