mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 14:54:54 +02:00
Do not throw away python stack trace
Errors when loading powerline fails are almost never giving any useful information for debugging.
This commit is contained in:
parent
a8ccfd4350
commit
c2cf679c6f
@ -10,7 +10,7 @@ function! s:CriticalError(message)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if ! has('python') && ! has('python3')
|
if ! has('python') && ! has('python3')
|
||||||
call s:CriticalError('You need vim compiled with Python 2.7 or 3.3+ support
|
call s:CriticalError('You need vim compiled with Python 2.7 or 3.2+ support
|
||||||
\ for Powerline to work. Please consult the documentation for more details.')
|
\ for Powerline to work. Please consult the documentation for more details.')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
@ -28,12 +28,15 @@ catch
|
|||||||
exec s:powerline_pycmd 'sys.path.append(vim.eval(''expand("<sfile>:h:h:h:h:h")''))'
|
exec s:powerline_pycmd 'sys.path.append(vim.eval(''expand("<sfile>:h:h:h:h:h")''))'
|
||||||
try
|
try
|
||||||
exec s:powerline_pycmd s:import_cmd
|
exec s:powerline_pycmd s:import_cmd
|
||||||
catch
|
let s:launched = 1
|
||||||
|
finally
|
||||||
|
if !exists('s:launched')
|
||||||
call s:CriticalError('An error occured while importing the Powerline package.
|
call s:CriticalError('An error occured while importing the Powerline package.
|
||||||
\ This could be caused by an invalid sys.path setting, or by an incompatible
|
\ This could be caused by an invalid sys.path setting, or by an incompatible
|
||||||
\ Python version (Powerline requires Python 2.7 or 3.3+ to work). Please consult
|
\ Python version (Powerline requires Python 2.7 or 3.2+ to work). Please consult
|
||||||
\ the troubleshooting section in the documentation for possible solutions.')
|
\ the troubleshooting section in the documentation for possible solutions.')
|
||||||
finish
|
finish
|
||||||
|
endif
|
||||||
endtry
|
endtry
|
||||||
endtry
|
endtry
|
||||||
exec s:powerline_pycmd 'powerline = VimPowerline()'
|
exec s:powerline_pycmd 'powerline = VimPowerline()'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user