summary refs log tree commit diff stats
path: root/tests/exception/tcpp_imported_exc2.nim
blob: ff299ea3df4a8475cf6f681fd0b072654932497c (plain) (blame)
1
2
3
4
5
6
7
8
9
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