diff options
Diffstat (limited to 'lib')
-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.} = |