-d:nimDebug: calls doAssert false instead of quit (#17739)

This commit is contained in:
Timothee Cour 2021-04-17 02:49:54 -07:00 • committed by GitHub
commit 5c9c1988f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 14 deletions

View file

@ -398,7 +398,8 @@ proc log*(s: string) =
close(f)
proc quit(conf: ConfigRef; msg: TMsgKind) {.gcsafe.} =
if defined(debug) or msg == errInternal or conf.hasHint(hintStackTrace):
if conf.isDefined("nimDebug"): quitOrRaise(conf, $msg)
elif defined(debug) or msg == errInternal or conf.hasHint(hintStackTrace):
{.gcsafe.}:
if stackTraceAvailable() and isNil(conf.writelnHook):
writeStackTrace()