              is-special-fn? (set (keys special-fns))
              request-prompt (Object.)
              request-exit (Object.)
-             opts (if-let [merge-opts (:merge-opts (-setup repl-env opts))]
-                    (merge opts merge-opts)
-                    opts)
+             opts (try
+                    (if-let [merge-opts (:merge-opts (-setup repl-env opts))]
+                      (merge opts merge-opts)
+                      opts)
+                    (catch Throwable e
+                      (caught e repl-env opts)))
              read-eval-print
              (fn []
                (let [input (binding [*ns* (create-ns ana/*cljs-ns*)

     - :print, function of one argument, prints its argument to the output
       default: println

     - :caught, function of two arguments, a throwable, called when
       read, eval, or print throws an exception or error
       default. The second argument is opts, the standard ClojureScript
       REPL/compiler options. In the case of errors or exception in the
       JavaScript target, these will be thrown as clojure.lang.IExceptionInfo
       instances.
       default: repl-caught

     - :reader, the c.t.r reader to use.

                       (print value))))))]
         (comp/with-core-cljs opts
           (fn []
             (try
               (when analyze-path
                 (analyze-source analyze-path opts))
               (evaluate-form repl-env env "<cljs repl>"
                 (with-meta
                   '(ns cljs.user
                      (:require [cljs.repl :refer-macros [doc]]))
                   {:line 1 :column 1})
                 identity opts)
               (catch Throwable e
                 (caught e repl-env opts)))
             (when-let [src (:watch opts)]
               (future
                 (let [log-file (io/file (util/output-directory opts) "watch.log")]
                   (print "Watch compilation log available at:" (str log-file))
                   (try
                     (binding [*out* (FileWriter. log-file)]
                       (cljsc/watch src (dissoc opts :watch)))
                     (catch Throwable e
                       (caught e repl-env opts))))))
             (binding [*in* (if (true? (:source-map-inline opts))
                              *in*
                              (reader))]
               (try
                 (init)
                 (catch Throwable e
                   (caught e repl-env opts)))
               ;; try to let things flush before printing prompt
               (prompt)
               (flush)
               (loop []
