Silence all callback errors
If this is to be made asynchronous, there's not really a good way to display the exception.
This commit is contained in:
parent
ebb2933f4c
commit
d6b3e1c67c
@ -198,12 +198,15 @@ function! s:nrepl_prepare(msg) dict abort
|
|||||||
return msg
|
return msg
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fireplace#nrepl#callback(body, type, callback)
|
function! fireplace#nrepl#callback(body, type, callback) abort
|
||||||
|
try
|
||||||
let response = {'body': a:body, 'type': a:type}
|
let response = {'body': a:body, 'type': a:type}
|
||||||
if has_key(g:fireplace_nrepl_sessions, get(a:body, 'session'))
|
if has_key(g:fireplace_nrepl_sessions, get(a:body, 'session'))
|
||||||
let response.session = g:fireplace_nrepl_sessions[a:body.session]
|
let response.session = g:fireplace_nrepl_sessions[a:body.session]
|
||||||
endif
|
endif
|
||||||
call call(a:callback[0], [response] + a:callback[1:-1])
|
call call(a:callback[0], [response] + a:callback[1:-1])
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:nrepl_call(msg, ...) dict abort
|
function! s:nrepl_call(msg, ...) dict abort
|
||||||
|
Loading…
Reference in New Issue
Block a user