File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 353353(defn- display-error
354354 ([repl-env ret form opts]
355355 (display-error repl-env ret form (constantly nil ) opts))
356- ([repl-env ret form f opts ]
356+ ([repl-env ret form f { :keys [print flush]} ]
357357 (f )
358358 (when-let [value (:value ret)]
359- (( : print opts) value))
359+ (print value))
360360 (when-let [st (:stacktrace ret)]
361361 (if (and (true ? (:source-map opts))
362362 (satisfies? IParseStacktrace repl-env))
363- (let [cst (-parse-stacktrace repl-env st ret opts)]
363+ (let [cst (try
364+ (-parse-stacktrace repl-env st ret opts)
365+ (catch Throwable e
366+ (when (:repl-verbose opts)
367+ (print " Failed to canonicalize stacktrace" )
368+ (print (with-out-str (.printStacktrace e *out*)))
369+ (flush ))))]
364370 (if (vector? cst)
365371 (if (satisfies? IPrintStacktrace repl-env)
366372 (-print-stacktrace repl-env cst ret opts)
367373 (print-mapped-stacktrace cst opts))
368- (( : print opts) st)))
369- (( : print opts) st))
370- (( : flush opts) ))))
374+ (print st)))
375+ (print st))
376+ (flush ))))
371377
372378(defn evaluate-form
373379 " Evaluate a ClojureScript form in the JavaScript environment. Returns a
You can’t perform that action at this time.
0 commit comments