mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
provider: Safely access job.stderr in #Require
If `jobstart()` fails, then the subsequent `rpcrequest()` will throw due
to an invalid channel id. This causes `job.stderr` not to exist, so we
throw another exception when trying to dump the job's stderr.
Error detected while processing function remote#define#AutocmdBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require:
line 22:
E716: Key not present in Dictionary: stderr
This obfuscates the actual problem.
This commit is contained in:
@@ -29,7 +29,7 @@ function! provider#pythonx#Require(host) abort
|
||||
catch
|
||||
echomsg v:throwpoint
|
||||
echomsg v:exception
|
||||
for row in job.stderr
|
||||
for row in get(job, 'stderr', [])
|
||||
echomsg row
|
||||
endfor
|
||||
endtry
|
||||
|
||||
Reference in New Issue
Block a user