        (if-let [result (do ~@body)]
          result
          ::nil)
-     (catch Throwable z# (with-meta [z#] {::exception true})))))
+     (catch Throwable z# (ChannelException. z#)))))
 
 (defn chan->lazy-seq
   "Pulls values from a channel until the channel is closed.

       (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#)))

