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

This commit is contained in:
Andreas Rumpf
2021-07-05 18:04:07 +02:00
committed by GitHub
parent ffa638ed50
commit 1bed777314

View File

@@ -446,9 +446,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: