From 0ff9cd710d5c29894e75f7814f9c7884f5471a34 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 6 Jan 2013 23:18:15 -0500 Subject: [PATCH] Tighten error handling of lein autoconnect Fixes #28. --- autoload/nrepl/foreplay_connection.vim | 4 ++-- plugin/foreplay.vim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/nrepl/foreplay_connection.vim b/autoload/nrepl/foreplay_connection.vim index 76b7a98..707f048 100644 --- a/autoload/nrepl/foreplay_connection.vim +++ b/autoload/nrepl/foreplay_connection.vim @@ -233,7 +233,7 @@ function! s:nrepl_call(payload) dict abort if !exists('err') return nrepl#foreplay_connection#bdecode('l'.out.'e') endif - throw 'nREPL: '.err + throw 'nREPL Connection Error: '.err endfunction finish @@ -289,7 +289,7 @@ EOF if !exists('err') return nrepl#foreplay_connection#bdecode('l'.out.'e') endif - throw 'nREPL: '.err + throw 'nREPL Connection Error: '.err endfunction finish diff --git a/plugin/foreplay.vim b/plugin/foreplay.vim index 4f366e5..2c1ccf4 100644 --- a/plugin/foreplay.vim +++ b/plugin/foreplay.vim @@ -997,7 +997,7 @@ function! s:leiningen_connect() let s:leiningen_repl_ports[b:leiningen_root] = getftime(portfile) try call s:register_connection(nrepl#foreplay_connection#open(port), b:leiningen_root) - catch /^nREPL: .*[Cc]onnection/ + catch /^nREPL Connection Error:/ call delete(portfile) endtry endif