       local-index)))
 
 #+cljs
-(defrecord Error [str])
+(def Error js/Error)
 
 (defn condition-accessor
   "Create an an accessor for `field-name` for conditions of type `type`."

  (and #+clj (instance? ExceptionInfo x)
       (contains? (ex-data x) ::condition)))

#+clj
(declare print-condition)

#+clj
(defmethod print-method ExceptionInfo [^ExceptionInfo exc ^java.io.Writer w]

                            comp))
                     (::components (ex-data cond)))]
        (nth (:arguments comp) i)
        (throw (new Error (str cond " is not a condition of type " type)))))))

(defmacro define-condition-type
  "    (define-condition-type <condition-type>
