From a5bc4b0b44804d9ba9f8a8e980d3fc135bb204e5 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 4 Dec 2012 20:13:45 -0500 Subject: [PATCH] nREPL: Throw error on invalid namespace References #2. --- autoload/nrepl/foreplay_connection.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/nrepl/foreplay_connection.vim b/autoload/nrepl/foreplay_connection.vim index 41f1e4e..9601c0b 100644 --- a/autoload/nrepl/foreplay_connection.vim +++ b/autoload/nrepl/foreplay_connection.vim @@ -117,6 +117,9 @@ function! s:nrepl_process(payload) dict abort echo substitute(packet.err, '\n$', '', '') echohl NONE 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') let result = packet endif