File tree Expand file tree Collapse file tree 4 files changed +7
-32
lines changed Expand file tree Collapse file tree 4 files changed +7
-32
lines changed Original file line number Diff line number Diff line change 6969 :value (str (js* " eval(~{block})" ))}
7070 (catch :default e
7171 {:status :exception
72- :ua-product (get-ua-product )
73- :value (str e)
74- :stacktrace
75- (if (.hasOwnProperty e " stack" )
76- (.-stack e)
77- " No stacktrace available." )}))]
72+ :value (cljs.repl/error->str e)}))]
7873 (pr-str result)))
7974
8075(defn send-result [connection url data]
Original file line number Diff line number Diff line change 148148 {:status :success
149149 :value (if-let [r (eval-str engine js)] (safe-to-string r) " " )}
150150 (catch ScriptException e
151- (let [^Throwable root-cause (clojure.stacktrace/root-cause e)]
152- {:status :exception
153- :value (.getMessage root-cause)
154- :stacktrace
155- (apply str
156- (interpose " \n "
157- (map #(subs % 5 )
158- (filter #(clojure.string/starts-with? % " <js>." )
159- (map str
160- (.getStackTrace root-cause))))))}))
151+ {:status :exception
152+ :value (eval-str engine " cljs.repl.error__GT_str(cljs.core._STAR_e)" )})
161153 (catch Throwable e
162154 (let [^Throwable root-cause (clojure.stacktrace/root-cause e)]
163155 {:status :exception
164- :value (.getMessage root-cause)
165- :stacktrace
166- (apply str
167- (interpose " \n "
168- (map str
169- (.getStackTrace root-cause))))}))))
156+ :value (cljs.repl/ex-str (cljs.repl/ex-triage (Throwable->map root-cause)))}))))
170157 (-load [{engine :engine :as this} ns url]
171158 (load-ns engine ns ))
172159 (-tear-down [this]
Original file line number Diff line number Diff line change 138138 (catch ScriptException e
139139 (let [^Throwable root-cause (clojure.stacktrace/root-cause e)]
140140 {:status :exception
141- :value (.getMessage root-cause)
142- :stacktrace (NashornException/getScriptStackString root-cause)}))
141+ :value (eval-str engine " cljs.repl.error__GT_str(cljs.core._STAR_e)" )}))
143142 (catch Throwable e
144143 (let [^Throwable root-cause (clojure.stacktrace/root-cause e)]
145144 {:status :exception
146- :value (.getMessage root-cause)
147- :stacktrace
148- (apply str
149- (interpose " \n "
150- (map str
151- (.getStackTrace root-cause))))}))))
145+ :value (cljs.repl/ex-str (cljs.repl/ex-triage (Throwable->map root-cause)))}))))
152146 (-load [{engine :engine :as this} ns url]
153147 (load-ns engine ns ))
154148 (-tear-down [this]
Original file line number Diff line number Diff line change 8686 (ScriptableObject/putProperty top-level " _STAR_e"
8787 (Context/javaToJS ex scope))
8888 {:status :exception
89- :value (.toString ex)
90- :stacktrace (stacktrace ex)}))))
89+ :value (cljs.repl/ex-str (cljs.repl/ex-triage (Throwable->map ex)))}))))
9190
9291(defn load-file
9392 " Load a JavaScript. This is needed to load JavaScript files before the Rhino
You can’t perform that action at this time.
0 commit comments