forked from VimPlug/jedi-vim
Use echoerr in jedi#init_python
This will abort the script, instead of finishing there only.
This commit is contained in:
@@ -126,12 +126,11 @@ function! jedi#init_python()
|
|||||||
try
|
try
|
||||||
let s:_init_python = s:init_python()
|
let s:_init_python = s:init_python()
|
||||||
catch
|
catch
|
||||||
if !exists("g:jedi#squelch_py_warning")
|
|
||||||
echohl WarningMsg
|
|
||||||
echom "Error: jedi-vim failed to initialize Python: ".v:exception." (in ".v:throwpoint.")"
|
|
||||||
echohl None
|
|
||||||
endif
|
|
||||||
let s:_init_python = 0
|
let s:_init_python = 0
|
||||||
|
if !exists("g:jedi#squelch_py_warning")
|
||||||
|
echoerr "Error: jedi-vim failed to initialize Python: "
|
||||||
|
\ .v:exception." (in ".v:throwpoint.")"
|
||||||
|
endif
|
||||||
endtry
|
endtry
|
||||||
endif
|
endif
|
||||||
return s:_init_python
|
return s:_init_python
|
||||||
@@ -202,12 +201,7 @@ function! jedi#_vim_exceptions(str, is_eval)
|
|||||||
return l:result
|
return l:result
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
call jedi#init_python() " Might throw an error.
|
||||||
if !jedi#init_python()
|
|
||||||
" Do not define any functions when Python initialization failed.
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" functions that call python code
|
" functions that call python code
|
||||||
|
|||||||
Reference in New Issue
Block a user