[bugfix] fix quit errormsg in nimvm (#11490)
This commit is contained in:
parent
e2f99a2026
commit
06ef56ba72
1 changed files with 5 additions and 2 deletions
|
|
@ -3775,6 +3775,9 @@ proc quit*(errormsg: string, errorcode = QuitFailure) {.noReturn.} =
|
||||||
## A shorthand for ``echo(errormsg); quit(errorcode)``.
|
## A shorthand for ``echo(errormsg); quit(errorcode)``.
|
||||||
when defined(nimscript) or defined(js) or (hostOS == "standalone"):
|
when defined(nimscript) or defined(js) or (hostOS == "standalone"):
|
||||||
echo errormsg
|
echo errormsg
|
||||||
|
else:
|
||||||
|
when nimvm:
|
||||||
|
echo errormsg
|
||||||
else:
|
else:
|
||||||
cstderr.rawWrite(errormsg)
|
cstderr.rawWrite(errormsg)
|
||||||
cstderr.rawWrite("\n")
|
cstderr.rawWrite("\n")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue