From 293ec4a0983a0ead92790db6cefbfd2fe4cebb4a Mon Sep 17 00:00:00 2001 From: scgilardi Date: Fri, 28 Nov 2008 15:04:47 +0000 Subject: except.clj: guard against a ClassCastException if throwable is called directly --- src/clojure/contrib/except.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/clojure') diff --git a/src/clojure/contrib/except.clj b/src/clojure/contrib/except.clj index 81cfee62..44f8c4d8 100644 --- a/src/clojure/contrib/except.clj +++ b/src/clojure/contrib/except.clj @@ -72,6 +72,7 @@ our-prefix "clojure.contrib.except.throwable" not-us? #(not (.startsWith (.getClassName %) our-prefix)) raw-trace (.getStackTrace throwable) - edited-trace (into-array (drop 3 (drop-while not-us? raw-trace)))] + edited-trace (into-array StackTraceElement + (drop 3 (drop-while not-us? raw-trace)))] (.setStackTrace throwable edited-trace) throwable)) -- cgit v1.2.3-70-g09d2