diff options
author | Andrii Riabushenko <cdome@bk.ru> | 2019-07-25 23:18:20 +0100 |
---|---|---|
committer | Andrii Riabushenko <cdome@bk.ru> | 2019-07-25 23:18:20 +0100 |
commit | 4c73139316fc7853b58f298a978ccd95aac6abe8 (patch) | |
tree | 8f39b17104808c10422c607d7ff024cb7be9d951 /compiler/msgs.nim | |
parent | 95856ab8d3db88709c39c6809e81b8ea539b2e8b (diff) | |
download | Nim-4c73139316fc7853b58f298a978ccd95aac6abe8.tar.gz |
revert changes
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r-- | compiler/msgs.nim | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 667ea5791..1264133a9 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -480,8 +480,7 @@ proc formatMsg*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string): s title & getMessageStr(msg, arg) -proc liMessage(conf: ConfigRef; notes: TNoteKinds, options: TOptions, - info: TLineInfo, msg: TMsgKind, arg: string, +proc liMessage(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string, eh: TErrorHandling) = var title: string @@ -501,16 +500,15 @@ proc liMessage(conf: ConfigRef; notes: TNoteKinds, options: TOptions, conf.m.lastError = info of warnMin..warnMax: sev = Severity.Warning - ignoreMsg = optWarns notin options or msg notin notes + ignoreMsg = optWarns notin conf.options or msg notin conf.notes if not ignoreMsg: writeContext(conf, info) title = WarningTitle color = WarningColor kind = WarningsToStr[ord(msg) - ord(warnMin)] inc(conf.warnCounter) - of hintMin..hintMax: sev = Severity.Hint - ignoreMsg = optHints notin options or msg notin notes + ignoreMsg = optHints notin conf.options or msg notin conf.notes title = HintTitle color = HintColor if msg != hintUserRaw: kind = HintsToStr[ord(msg) - ord(hintMin)] @@ -536,34 +534,30 @@ proc fatal*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg = "") = # this fixes bug #7080 so that it is at least obvious 'fatal' # was executed. conf.m.errorOutputs = {eStdOut, eStdErr} - liMessage(conf, conf.notes, conf.options, info, msg, arg, doAbort) + liMessage(conf, info, msg, arg, doAbort) proc globalError*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg = "") = - liMessage(conf, conf.notes, conf.options, info, msg, arg, doRaise) + liMessage(conf, info, msg, arg, doRaise) proc globalError*(conf: ConfigRef; info: TLineInfo, arg: string) = - liMessage(conf, conf.notes, conf.options, info, errGenerated, arg, doRaise) + liMessage(conf, info, errGenerated, arg, doRaise) proc localError*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg = "") = - liMessage(conf, conf.notes, conf.options, info, msg, arg, doNothing) + liMessage(conf, info, msg, arg, doNothing) proc localError*(conf: ConfigRef; info: TLineInfo, arg: string) = - liMessage(conf, conf.notes, conf.options, info, errGenerated, arg, doNothing) + liMessage(conf, info, errGenerated, arg, doNothing) proc localError*(conf: ConfigRef; info: TLineInfo, format: string, params: openArray[string]) = localError(conf, info, format % params) proc message*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg = "") = - liMessage(conf, conf.notes, conf.options, info, msg, arg, doNothing) - -proc message*(conf: ConfigRef; notes: TNoteKinds, options: TOptions; - info: TLineInfo, msg: TMsgKind, arg = "") = - liMessage(conf, notes, options, info, msg, arg, doNothing) + liMessage(conf, info, msg, arg, doNothing) proc internalError*(conf: ConfigRef; info: TLineInfo, errMsg: string) = if conf.cmd == cmdIdeTools and conf.structuredErrorHook.isNil: return writeContext(conf, info) - liMessage(conf, conf.notes, conf.options, info, errInternal, errMsg, doAbort) + liMessage(conf, info, errInternal, errMsg, doAbort) proc internalError*(conf: ConfigRef; errMsg: string) = if conf.cmd == cmdIdeTools and conf.structuredErrorHook.isNil: return |