From e374759f29da733f3c404718c333f5f3cb5f332d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Sat, 9 Mar 2024 10:42:34 +0000 Subject: [PATCH] [Backport 2.0] When NimScript errors prevents NimSuggest from Init (#23349) --- compiler/msgs.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 3848bdbfe7..4e9b04de66 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -438,7 +438,11 @@ proc handleError(conf: ConfigRef; msg: TMsgKind, eh: TErrorHandling, s: string, if conf.errorCounter >= conf.errorMax: # only really quit when we're not in the new 'nim check --def' mode: if conf.ideCmd == ideNone: - quit(conf, msg) + when defined(nimsuggest): + #we need to inform the user that something went wrong when initializing NimSuggest + raiseRecoverableError(s) + else: + quit(conf, msg) elif eh == doAbort and conf.cmd != cmdIdeTools: quit(conf, msg) elif eh == doRaise: