   (-> (jsloader/load url)
       (.addCallbacks success err)))
 
+(defn error-string [error]
+  (str error.name ": " error.message ". Check console for stack trace."))
+
 (rf/register-handler
   :initialize
   (fn [db _]

    (let [{:keys [externed-namespaces namespace-text]} db]
      (if (string/blank? namespace-text)
        (do
          (js/alert "Please enter a namespace to generate an extern")
          db)
        (do
          (rf/dispatch [:namespace-text-change ""])

                                               namespace-text (extract namespace-text)))
            (catch js/Error e
              (.error js/console e)
              (rf/dispatch [:alert "Error generating extern" (error-string e)])
              db)))))))

(rf/register-handler
