This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Handle ClassNotFoundExceptions wrapped in RuntimeExceptions when reso…

…lving namespaces

  - stops exceptions being thrown in Emacs's autocomplete mode when autocompleting namespaces.
  • Loading branch information...
samaaron committed May 12, 2012
1 parent e804fda commit 18eb9b964d362d641b3eaa9410e36ddc67d6b726
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/swank/commands/basic.clj
@@ -210,7 +210,9 @@
(try
(ns-resolve (maybe-ns *current-package*) (symbol symbol-name))
(catch ClassNotFoundException e nil)
- (catch RuntimeException e nil)))
+ (catch RuntimeException e (if (instance? ClassNotFoundException (.getCause e))
+ nil
+ (throw e)))))
(defn- maybe-resolve-ns
"Returns a Namespace or nil"

0 comments on commit 18eb9b9

Please sign in to comment.