Skip to content

Commit 7275372

Browse files
author
dnolen
committed
cljs.repl/pst support for Rhino REPL
1 parent 68008cc commit 7275372

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/clj/cljs/repl/rhino.clj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@
189189
(Integer/parseInt line))
190190
:column 0}))
191191
(string/split frames-str #"\n"))))
192+
repl/IGetError
193+
(-get-error [this e env opts]
194+
(let [{:keys [scope]} this
195+
ex (-> scope
196+
(ScriptableObject/getProperty "cljs")
197+
(ScriptableObject/getProperty "core")
198+
(ScriptableObject/getProperty "_STAR_e")
199+
.unwrap)]
200+
{:status :exception
201+
:value (.toString ex)
202+
:stacktrace (stacktrace ex)}))
192203
repl/IJavaScriptEnv
193204
(-setup [this opts]
194205
(rhino-setup this opts))

0 commit comments

Comments
 (0)