      ;; are we only accepting string ids?
      (f (keep namify args)))))
 
+;; this is temporary until my cljs.repl changes make it to release
+(defn catch-special-fn-errors [special-fn]
+  (fn self
+    ([a b c] (self a b c nil))
+    ([a b form d]
+     (try
+       (special-fn a b form d)
+       (catch Throwable ex
+         (println "Failed to execute special function:" (pr-str (first form)))
+         (trace/print-cause-trace ex 12))))))
+
 (defn setup-control-fns [all-builds build-ids figwheel-server]
   (let [logfile-path (or (:server-logfile figwheel-server) "figwheel_server.log")
         _ (mkdirs logfile-path)

(defn repl-function-docs  []
  "Figwheel Controls:
          (stop-autobuild)           ;; stops Figwheel autobuilder
          (start-autobuild [id ...]) ;; starts autobuilder focused on option ids
          (switch-to-build id ...)   ;; switches  autobuilder
          (reset-autobuild)          ;; stops, cleans, and starts autobuilder
          (build-once [id ...])      ;; builds source once time
          (clean-build)              ;; deletes compiled cljs target files
    Docs: (doc function-name-here)
    Exit: Control+C or :cljs/quit
 Results: Stored in vars *1, *2, *3")

                                 :focus-ids  build-ids})
        validate-build-ids (let [bs (set (keep :id all-builds))]
                             (fn [ids]
                               (vec (keep #(if (bs %) % (println "No such build id:" %)) ids))))
        get-ids            (fn [ids]
                             (or (and (empty? ids)
                                      (:focus-ids @state-atom))
                                 (validate-build-ids ids)))
        display-focus-ids (fn [ids]
                            (when (not-empty ids)
                              (println "Focusing on build ids:" (string/join ", " ids))))
        builder-running? #(:autobuilder @state-atom)
        ;; we are going to take an optiona id here
        build-once*     (fn [ids]
                          (let [bs (set (get-ids ids))
                                builds (filter #(bs (:id %)) all-builds)]
                            (display-focus-ids (map :id builds))
                            (mapv auto/build-once builds)))
        clean-build*    (fn [ids]
                          (let [bs (set (get-ids ids))
                                builds (filter #(bs (:id %)) all-builds)]
                            (display-focus-ids (map :id builds))
                            (mapv cbuild/clean-build (map :build-options builds))
                            (println "Deleting ClojureScript compilation target files.")))
        run-autobuilder (fn [figwheel-server build-ids]
                          (when-not (builder-running?)
                            (build-once* build-ids)
                            (binding [*out* log-writer
                                      *err* log-writer]
                              (when-let [abuild (autobuild-ids
                                                 { :all-builds all-builds
                                                   :build-ids build-ids
                                                   :figwheel-server figwheel-server })]
                                (reset! state-atom { :autobuilder abuild
                                                     :focus-ids build-ids})))))
        stop-autobuild*  (fn [_]
