adds a test case (#24532)

closes #18070
This commit is contained in:
ringabout
2024-12-12 22:30:54 +08:00
committed by GitHub
parent 9bb7e53e7f
commit f796c01e3c

View File

@@ -861,3 +861,17 @@ block:
var s = Foo()
new(s, delete)
proc test_18070() = # bug #18070
try:
try:
raise newException(CatchableError, "something")
except:
raise newException(CatchableError, "something else")
except:
doAssert getCurrentExceptionMsg() == "something else"
let msg = getCurrentExceptionMsg()
doAssert msg == "", "expected empty string but got: " & $msg
test_18070()