Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Try .toString on current-exception before defaulting to "No message." #133

Merged
merged 1 commit into from

2 participants

@ryfow

Some Exceptions have a null message but toString provides valuable information. Cassandra's InvalidRequestException is an example.

This change tries .getMessage, then .toString before defaulting to "No message."

@technomancy
Owner

Thanks, but I'm actually ceasing maintainership of swank in favour of nrepl.el and ritz, which are seeing much more active development effort.

I'll go ahead and merge this, but I don't have any plans to make a further release.

@technomancy technomancy merged commit 0ad6636 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/swank/core.clj
View
4 src/swank/core.clj
@@ -142,7 +142,9 @@ values."
(map #(exception-str width %) (.getStackTrace #^Throwable t)))))
(defmethod debugger-condition-for-emacs :default []
- (list (or (.getMessage #^Throwable *current-exception*) "No message.")
+ (list (or (.getMessage #^Throwable *current-exception*)
+ (.toString #^Throwable *current-exception*)
+ "No message.")
(str " [Thrown " (class *current-exception*) "]")
nil))
Something went wrong with that request. Please try again.