        (a/>! ~chan val#)
        (a/>! ~chan ::nil))
      (catch Throwable z#
-       (a/>! ~chan (with-meta [z#] {::exception true})))))
+       (a/>! ~chan (->ChannelException z#)))))
 
 (defmacro safe->!!
   "A safe version of clojure.core.async/>!!

  `(let [val# (a/<! ~chan)]
     (cond
       (= val# ::nil) nil
       (-> val# meta ::exception) (throw (first val#))
       (nil? val#) ::complete
       :else val#)))


       (do (a/>!! ~chan val#))
       (do (a/>!! ~chan ::nil)))
     (catch Throwable z#
       (a/>!! ~chan (ChannelException. z#)))))

(defmacro safe-<!
  "A safe version of clojure.core.async/<!
