mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:30:05 +08:00
Print error if user's bootstrap was unsuccessful (#4093)
This commit is contained in:
parent
934d975ff3
commit
93adceec29
@ -171,12 +171,25 @@ function! SpaceVim#autocmds#VimEnter() abort
|
||||
if !empty(get(g:, '_spacevim_bootstrap_after', ''))
|
||||
try
|
||||
call call(g:_spacevim_bootstrap_after, [])
|
||||
let g:_spacevim_bootstrap_after_success = 1
|
||||
catch
|
||||
call SpaceVim#logger#error('failed to call bootstrap_after function: ' . g:_spacevim_bootstrap_after)
|
||||
call SpaceVim#logger#error(' exception: ' . v:exception)
|
||||
call SpaceVim#logger#error(' throwpoint: ' . v:throwpoint)
|
||||
let g:_spacevim_bootstrap_after_success = 0
|
||||
endtry
|
||||
endif
|
||||
|
||||
if !get(g:, '_spacevim_bootstrap_before_success', 1)
|
||||
echohl Error
|
||||
echom 'bootstrap_before function failed to execute. Check `SPC h L` for errors.'
|
||||
echohl None
|
||||
endif
|
||||
if !get(g:, '_spacevim_bootstrap_after_success', 1)
|
||||
echohl Error
|
||||
echom 'bootstrap_after function failed to execute. Check `SPC h L` for errors.'
|
||||
echohl None
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:disable_welcome() abort
|
||||
|
@ -160,10 +160,12 @@ function! SpaceVim#custom#apply(config, type) abort
|
||||
if !empty(bootstrap_before)
|
||||
try
|
||||
call call(bootstrap_before, [])
|
||||
let g:_spacevim_bootstrap_before_success = 1
|
||||
catch
|
||||
call SpaceVim#logger#error('failed to call bootstrap_before function: ' . bootstrap_before)
|
||||
call SpaceVim#logger#error(' exception: ' . v:exception)
|
||||
call SpaceVim#logger#error(' throwpoint: ' . v:throwpoint)
|
||||
let g:_spacevim_bootstrap_before_success = 0
|
||||
endtry
|
||||
endif
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user