tcpp_imported_exc2.nim 316 B

1234567891011
  1. discard """
  2. targets: "cpp"
  3. output: ""
  4. """
  5. #issue #14369 case 2
  6. type RuntimeError {.requiresInit, importcpp: "std::runtime_error", header: "<stdexcept>".} = object
  7. proc initRuntimeError(a: cstring): RuntimeError {.importcpp: "std::runtime_error(@)", constructor.}
  8. try: raise initRuntimeError("foo2")
  9. except: discard