summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-03-09 18:12:52 +0100
committerGitHub <noreply@github.com>2020-03-09 18:12:52 +0100
commitec5cef13cffdb43a7298736b65e1a76e83741dff (patch)
tree206c989b60e7a318ed3ff25108e48030553f0d0b /compiler
parent63af8ae53ca8e1ffd61a2c2d55d09c5fe30310e1 (diff)
downloadNim-ec5cef13cffdb43a7298736b65e1a76e83741dff.tar.gz
fixes #13599 (#13614)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim
index c430dd062..9c067a339 100644
--- a/compiler/ccgstmts.nim
+++ b/compiler/ccgstmts.nim
@@ -1115,10 +1115,10 @@ proc genTryGoto(p: BProc; t: PNode; d: var TLoc) =
       # 3. finally is run for exception handling code without any 'except'
       #    handler present or only handlers that did not match.
       linefmt(p, cpsStmts, "*nimErr_ += oldNimErr$1_ + (*nimErr_ - oldNimErrFin$1_); oldNimErr$1_ = 0;$n", [lab])
-    raiseExit(p)
     endBlock(p)
   # restore the real error value:
   linefmt(p, cpsStmts, "*nimErr_ += oldNimErr$1_;$n", [lab])
+  if p.prc != nil: raiseExit(p)
 
 proc genTrySetjmp(p: BProc, t: PNode, d: var TLoc) =
   # code to generate: