        (do (a/>!! ~chan val#))
        (do (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/<!

       (a/>! ~chan val#)
       (a/>! ~chan ::nil))
     (catch Throwable z#
       (a/>! ~chan (with-meta [z#] {::exception true})))))

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

  `(let [val# (a/<!! ~chan)]
     (cond
       (= val# ::nil) nil
       (instance? ChannelException val#) (throw (:z val#))
       (nil? val#) ::complete
       :else val#)))

