diff options
author | Emery Hemingway <ehmry@posteo.net> | 2018-05-04 07:40:40 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-05-04 07:40:40 +0200 |
commit | cda591a42f5c3ef29911078c862cb6c07e35f651 (patch) | |
tree | 53f6f11e8b1761125481d3fb25ecb142280f6234 /lib/system.nim | |
parent | 27631b1112bb10e4a7ca43b611c2d3bde2ba320f (diff) | |
download | Nim-cda591a42f5c3ef29911078c862cb6c07e35f651.tar.gz |
Disable setTerminate when noCppExceptions is defined (#7751)
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim index 0c8659fda..5781aff27 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -4172,8 +4172,9 @@ template doAssertRaises*(exception, code: untyped): typed = if wrong: raiseAssert(astToStr(exception) & " wasn't raised by:\n" & astToStr(code)) -when defined(cpp) and appType != "lib" and not defined(js) and - not defined(nimscript) and hostOS != "standalone": +when defined(cpp) and appType != "lib" and + not defined(js) and not defined(nimscript) and + hostOS != "standalone" and not defined(noCppExceptions): proc setTerminate(handler: proc() {.noconv.}) {.importc: "std::set_terminate", header: "<exception>".} setTerminate proc() {.noconv.} = |