fixes #18411 (#18432) [backport:1.4]

(cherry picked from commit 1bed777314)
This commit is contained in:
Andreas Rumpf
2021-07-05 18:04:07 +02:00
committed by narimiran
parent 8a3e64f00e
commit 88340aab6d

View File

@@ -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: