mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-27 01:34:02 +00:00
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