Skip to content

Commit

Permalink
don't throw exceptions when completion can't load
Browse files Browse the repository at this point in the history
(say for instance when using drawbridge to connect to an HTTP transport)
  • Loading branch information
dakrone committed Apr 4, 2012
1 parent 446a508 commit 3902cdd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/clj/reply/initialization.clj
Expand Up @@ -120,9 +120,12 @@
~(export-definition 'reply.initialization/lazy-clojuredocs)
(~'intern-with-meta '~'user '~'clojuredocs ~'#'lazy-clojuredocs)

(require '[complete.core])
~(export-definition 'reply.initialization/resolve-class)
(~'intern-with-meta '~'complete.core '~'resolve-class ~'#'resolve-class)
(try
(require '[complete.core])
~(export-definition 'reply.initialization/resolve-class)
(~'intern-with-meta '~'complete.core '~'resolve-class ~'#'resolve-class)
(catch Exception e#
(println "Unable to initialize completion.")))

(in-ns '~'user)

Expand Down

2 comments on commit 3902cdd

@trptcolin
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I'm imagining there might still be problems when hitting Tab, but not sure. Chas had an idea about loading the completion stuff over the wire for #32 that seems interesting.

@dakrone
Copy link
Collaborator Author

@dakrone dakrone commented on 3902cdd Apr 4, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, you're right, hitting Tab causes more exceptions, this one just hides the first one when starting the repl, I'll work on hiding the others also.

Please sign in to comment.