nimsuggest chk works for EPC

This commit is contained in:
Andreas Rumpf 2017-03-03 11:59:00 +01:00
commit 6c0304f7f5
3 changed files with 24 additions and 22 deletions

View file

@ -828,6 +828,12 @@ proc getMessageStr(msg: TMsgKind, arg: string): string =
type
TErrorHandling = enum doNothing, doAbort, doRaise
proc log*(s: string) {.procvar.} =
var f: File
if open(f, getHomeDir() / "nimsuggest.log", fmAppend):
f.writeLine(s)
close(f)
proc quit(msg: TMsgKind) =
if defined(debug) or msg == errInternal or hintStackTrace in gNotes:
if stackTraceAvailable() and isNil(writelnHook):
@ -838,12 +844,6 @@ proc quit(msg: TMsgKind) =
options.command & " <file>")
quit 1
proc log*(s: string) {.procvar.} =
var f: File
if open(f, getHomeDir() / "nimsuggest.log", fmAppend):
f.writeLine(s)
close(f)
proc handleError(msg: TMsgKind, eh: TErrorHandling, s: string) =
if msg >= fatalMin and msg <= fatalMax:
if gCmd == cmdIdeTools: log(s)