[Backport 2.0] When NimScript errors prevents NimSuggest from Init (#23349)

This commit is contained in:
Juan M Gómez
2024-03-09 10:42:34 +00:00
committed by GitHub
parent 0de70dc7f3
commit e374759f29

View File

@@ -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: