Skip to content

Commit

Permalink
improve missing instance error
Browse files Browse the repository at this point in the history
  • Loading branch information
thheller committed Feb 4, 2021
1 parent 8959d87 commit c7c831e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/shadow/cljs/devtools/server/runtime.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
(defn get-instance! []
(let [inst @instance-ref]
(when-not inst
(throw (ex-info "missing instance" {})))
(throw (ex-info
(str "shadow-cljs has not been started yet!\n"
"In embedded mode you need to call (shadow.cljs.devtools.server/start!) to start it.\n"
"If you have a shadow-cljs server or watch running then you are not connected to that process.") {})))
inst))

(defn set-instance! [app]
Expand Down

0 comments on commit c7c831e

Please sign in to comment.