mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
@@ -727,6 +727,7 @@ proc genRaiseStmt(p: BProc, t: PNode) =
|
||||
initLocExprSingleUse(p, t[0], a)
|
||||
finallyActions(p)
|
||||
var e = rdLoc(a)
|
||||
discard getTypeDesc(p.module, t[0].typ)
|
||||
var typ = skipTypes(t[0].typ, abstractPtrs)
|
||||
# XXX For reasons that currently escape me, this is only required by the new
|
||||
# C++ based exception handling:
|
||||
|
||||
10
tests/exception/tcpp_imported_exc2.nim
Normal file
10
tests/exception/tcpp_imported_exc2.nim
Normal file
@@ -0,0 +1,10 @@
|
||||
discard """
|
||||
targets: "cpp"
|
||||
output: ""
|
||||
"""
|
||||
#issue #14369 case 2
|
||||
type RuntimeError {.requiresInit, importcpp: "std::runtime_error", header: "<stdexcept>".} = object
|
||||
|
||||
proc initRuntimeError(a: cstring): RuntimeError {.importcpp: "std::runtime_error(@)", constructor.}
|
||||
try: raise initRuntimeError("foo2")
|
||||
except: discard
|
||||
Reference in New Issue
Block a user