adds a test case (#24532)

closes #18070

(cherry picked from commit f796c01e3c)
This commit is contained in:
ringabout
2024-12-12 22:30:54 +08:00
committed by narimiran
parent 5b0b90fb49
commit 428b64251f

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()