Skip to content

Commit d7fc5de

Browse files
author
dnolen
committed
default eval wrap needs to pr-str _inside_ the try otherwise
exceptions from printing lazy seqs will not get caught
1 parent 7275372 commit d7fc5de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/clj/cljs/repl.clj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -467,16 +467,16 @@
467467
('#{*1 *2 *3 *e} form) (fn [x] `(cljs.core.pr-str ~x))
468468
:else
469469
(fn [x]
470-
`(cljs.core.pr-str
471-
(try
470+
`(try
471+
(cljs.core.pr-str
472472
(let [ret# ~x]
473473
(set! *3 *2)
474474
(set! *2 *1)
475475
(set! *1 ret#)
476-
ret#)
477-
(catch :default e#
478-
(set! *e e#)
479-
(throw e#)))))))
476+
ret#))
477+
(catch :default e#
478+
(set! *e e#)
479+
(throw e#))))))
480480

481481
(defn- eval-cljs
482482
"Given a REPL evaluation environment, an analysis environment, and a

0 commit comments

Comments
 (0)