nREPL: Throw error on invalid namespace

References #2.
This commit is contained in:
Tim Pope 2012-12-04 20:13:45 -05:00
parent 7a98feb253
commit a5bc4b0b44
1 changed files with 3 additions and 0 deletions

View File

@ -117,6 +117,9 @@ function! s:nrepl_process(payload) dict abort
echo substitute(packet.err, '\n$', '', '') echo substitute(packet.err, '\n$', '', '')
echohl NONE echohl NONE
endif endif
if has_key(packet, 'status') && index(packet.status, 'error') >= 0
throw 'nREPL: ' . tr(packet.status[0], '-', ' ')
endif
if has_key(packet, 'ex') || has_key(packet, 'value') if has_key(packet, 'ex') || has_key(packet, 'value')
let result = packet let result = packet
endif endif