From 88340aab6d051540f5aad00bbf549b007fa28ea0 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 5 Jul 2021 18:04:07 +0200 Subject: [PATCH] fixes #18411 (#18432) [backport:1.4] (cherry picked from commit 1bed7773146d6acf704b0ae5cfe62455f7a127a1) --- lib/system/excpt.nim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index 1a7473a76e..b41c415205 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -440,9 +440,7 @@ proc raiseExceptionAux(e: sink(ref Exception)) {.nodestroy.} = pushCurrentException(e) {.emit: "throw e;".} elif defined(nimQuirky) or gotoBasedExceptions: - # XXX This check should likely also be done in the setjmp case below. - if e != currException: - pushCurrentException(e) + pushCurrentException(e) when gotoBasedExceptions: inc nimInErrorMode else: