Avoid echoerr inside catch block
This commit is contained in:
parent
da7d6bd58b
commit
300176ba9f
7
plug.vim
7
plug.vim
|
@ -295,6 +295,7 @@ function! s:add(force, repo, ...)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let exception = ''
|
||||||
try
|
try
|
||||||
let [name, spec] = s:build_plug_spec(a:repo, a:000)
|
let [name, spec] = s:build_plug_spec(a:repo, a:000)
|
||||||
|
|
||||||
|
@ -310,9 +311,11 @@ function! s:add(force, repo, ...)
|
||||||
let g:plugs[name] = spec
|
let g:plugs[name] = spec
|
||||||
let g:plugs_order += [name]
|
let g:plugs_order += [name]
|
||||||
catch
|
catch
|
||||||
echoerr v:exception
|
let exception = v:exception
|
||||||
return
|
|
||||||
endtry
|
endtry
|
||||||
|
if !empty(exception)
|
||||||
|
echoerr exception
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:build_plug_spec(repo, opts)
|
function! s:build_plug_spec(repo, opts)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user