   data to the output stream. Throws an exception of the output stream
   is closed."
   [proc transit-data]
-  #_(println "Send bytes:")
-  #_(println (count transit-data))
-  #_(println (Hex/encodeHexString transit-data))
   (try
     (.write (:out proc) transit-data 0 (count transit-data))
     (.flush (:out proc))
-    (catch Throwable _
-      (throw (ex-info "Disconnected" {:status :disconnected :p proc :transit transit-data})))))
+    (catch Throwable e
+      (throw (ex-info "Disconnected" {:status :disconnected :cause e})))))
 
 (defn read-response
   "Given a process and a timeout in milliseconds, attempt to read
   a transit value.  If the read times out, returns `::timeout`.`"
   [proc timeout-ms]
-  (let [f (future (r/read @(:reader proc)))]
-    (deref f timeout-ms ::timeout)))
+  (let [f (future (r/read @(:reader proc)))
+        result (try
+                 (deref f timeout-ms ::timeout)
+                 (catch Throwable e
+                   (throw (ex-info "Read error" {:status :read-error :cause e}))))]
+    (if (= result ::timeout)
+      (throw (ex-info "Response timeout" {:status :timeout}))
+      result)))
 
 (defn equalize [data]
   (walk/prewalk (fn [node]

  stream which can be used to send data to the process, `:p` the
  process and `:reader` a transit reader."
  [command encoding]
  ;; TODO: what if there is exception here? need to report that we
  ;; couldn't start the process?
  ;; TODO: how do we communicate that the encoding is not supported?
  (let [p (.start (ProcessBuilder. [command (name encoding)]))
        out (BufferedOutputStream. (.getOutputStream p))
        in (BufferedInputStream. (.getInputStream p))]
    ;; r/reader does not return until data starts to flow over in
    {:out out :p p :reader (future (r/reader in encoding))}))

(defn stop-process

        testable-impls (keep #(let [script (io/file root (str % "/bin/roundtrip"))]
                                (when (.exists script) %))
                             (.list root))
        ;; Generate n random forms. Use the same set for all tests.
        forms (when-let [n (:gen opts)]
                (take n (repeatedly gen/ednable)))]
    (doseq [impl testable-impls]
      (when (or (not impls)
                (contains? impls impl))
        (verify-encodings impl (assoc opts :generated-forms forms))))))

(defn read-options
  "Given a sequence of strings which are the command line arguments,
