fixes #22398; [backport] (#23704)

This commit is contained in:
Andreas Rumpf
2024-06-10 18:43:23 +02:00
committed by GitHub
parent 1cbcbd9269
commit 8cbbe12ee4
2 changed files with 32 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
discard """
output: '''0
true'''
cmd: "nim c --gc:arc $file"
"""
# bug #22398
for i in 0 ..< 10_000:
try:
try:
raise newException(ValueError, "")
except CatchableError:
discard
raise newException(ValueError, "") # or raise getCurrentException(), just raise works ok
except ValueError:
discard
echo getOccupiedMem()
echo getCurrentException() == nil