mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 19:52:36 +00:00
adds a test case (#24532)
closes #18070
(cherry picked from commit f796c01e3c)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user