mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 09:14:00 +00:00
Disable setTerminate when noCppExceptions is defined (#7751)
This commit is contained in:
committed by
Andreas Rumpf
parent
27631b1112
commit
cda591a42f
@@ -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.} =
|
||||
|
||||
Reference in New Issue
Block a user