You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cider-load-buffer should report any top-level exceptions
Actual behavior
eval-last-sexp on e.g. (cons 1 2) will correctly report an error, while cider-load-buffer with the same expression at top-level will simply ignore it and report nothing.
Steps to reproduce the problem
cider-jack-in-cljs with Node repl
(ns main
(:require
[cljs.nodejs :as node]
[cljs.pprint :as pp]))
(cons12)
cider-eval-last-sexp will correctly report not ISeqable error when evaluating that (cons ...), however cider-load-buffer will happily run till completion completely ignoring any such errors.
We can confirm error is thrown and can be caught by wrapping that cons in (try (cons 1 2) (catch :default e (println :foo))) then cider-load-buffer will print :foo.
My best guess is that default cider-load-file-handler for Node does or doesn't do something here? Not sure.
Hm, sounds close enough however let me point out again that wrapping in (try ... catch) the same expression that throws results in said exception being reported which tells me that the wrapped expression is being evaled despite not being the first. And in fact this code cider-load-buffer handles just fine i.e. I'm not seeing what the linked issue reports: all forms are evaluated.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
Expected behavior
cider-load-buffer
should report any top-level exceptionsActual behavior
eval-last-sexp
on e.g.(cons 1 2)
will correctly report an error, whilecider-load-buffer
with the same expression at top-level will simply ignore it and report nothing.Steps to reproduce the problem
cider-jack-in-cljs
with Node replcider-eval-last-sexp
will correctly report not ISeqable error when evaluating that(cons ...)
, howevercider-load-buffer
will happily run till completion completely ignoring any such errors.We can confirm error is thrown and can be caught by wrapping that
cons
in(try (cons 1 2) (catch :default e (println :foo)))
thencider-load-buffer
will print:foo
.My best guess is that default
cider-load-file-handler
for Node does or doesn't do something here? Not sure.Environment & Version information
Reproduced
CIDER version information
Lein/Boot version
Emacs version
27.2 and 28.0.50
Operating system
Mac OSX 11.6.2 Big Sur
Latest Guix SD
The text was updated successfully, but these errors were encountered: