Self time: 19.799230
count total (s) self (s)
1 0.000015 0.000010 let channel = cocclientget_channel(self)
1 0.000004 if empty(channel) | return '' | endif
1 0.000001 try
1 0.000001 if s:is_vim
1 19.799549 19.799111 let res = ch_evalexpr(channel, [a:method, a:args], {'timeout': 30000})
1 0.000005 if type(res) == 1 && res == ''
throw 'timeout after 30s'
1 0.000001 endif
1 0.000003 let [l:errmsg, res] = res
1 0.000003 if !empty(l:errmsg)
throw l:errmsg
1 0.000001 else
1 0.000002 return res
endif
endif
return call('rpcrequest', [channel, a:method] + a:args)
catch /.*/
if v:exception =~ 'E475'
if get(g:, 'coc_vim_leaving', 0) | return | endif
echohl Error | echom '['.self.name.'] server connection lost' | echohl None
let name = self.name
call s:on_exit(name, 0)
execute 'silent do User ConnectionLost'.toupper(name[0]).name[1:]
elseif v:exception =~ 'E12'
" neovim's bug, ignore it
else
echohl Error | echo 'Error on request ('.a:method.'): '.v:exception | echohl None
endif
1 0.000002 endtry
FUNCTION 284()
Defined: ~/.vim/plugged/coc.nvim/autoload/coc/api.vim line 105
Called 2 times