 (ns com.billpiel.sayid.nrepl-middleware
-  (:require [clojure.tools.nrepl.middleware :refer [set-descriptor!]]
+  (:require [clojure.stacktrace :as st]
+            [clojure.tools.nrepl.middleware :refer [set-descriptor!]]
             [clojure.tools.nrepl.misc :refer [response-for]]
             [clojure.tools.nrepl.transport :as t]
             [com.billpiel.sayid.core :as sd]

                                         :value out)))
       (catch Exception e
         (t/send transport (response-for msg
                                         :value (with-out-str (clojure.stacktrace/print-stack-trace e)))))
       (finally
         (send-status-done msg))))


      ((get sayid-nrepl-ops op handler) msg)
      (catch Throwable e
          (println (.getMessage e))
          (st/print-stack-trace e)
          (reply:clj->nrepl msg (.getMessage e))))))


