-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
raise CatchableError is broken with --gc:arc when throwing inside a proc.
This bug is different from #13585, eg here the behavior depends on whether raise is at proc or module level; also #13585 was only for doAssert, not raise newException(CatchableError, "foo"), whereas here the bug is for raise newException(CatchableError, "foo")
Example
proc main() = # would work if at top-level instead of inside proc
try:
echo "before"
raise newException(CatchableError, "foo")
# except CatchableError: # would work
except AssertionError:
echo "caught"
echo "after"
main()Current Output
before
after
Expected Output
should be same as we have without --gc:arc or with try/catch at module-level
before
...
Error: unhandled exception: foo [CatchableError]
Additional Information
- devel 1.1.1 cb0f7c5