use abort instead of quit (#10872)

This commit is contained in:
Arne Döring 2019-03-21 06:52:30 +01:00 • committed by Andreas Rumpf
commit 514674cb38
2 changed files with 9 additions and 5 deletions

View file

@ -38,10 +38,15 @@ proc showErrorMessage(data: cstring) {.gcsafe.} =
writeToStdErr(data)
proc quitOrDebug() {.inline.} =
when not defined(endb):
quit(1)
else:
when defined(endb):
endbStep() # call the debugger
elif not defined(nodejs) and not defined(nimscript):
when nimvm:
quit(1)
else:
c_abort()
else:
quit(1)
proc chckIndx(i, a, b: int): int {.inline, compilerproc, benign.}
proc chckRange(i, a, b: int): int {.inline, compilerproc, benign.}