Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js/Object and :default should work in CLJS try catch when allowing all classes #585

Closed
borkdude opened this issue Jul 3, 2021 · 1 comment

Comments

@borkdude
Copy link
Collaborator

borkdude commented Jul 3, 2021

Repro:

(require '[sci.core :as sci] :reload)
(def ctx (sci/init {:classes {'js goog/global :allow :all}}))

(sci/eval-string* ctx "(try (assoc 1 1 1) (catch js/Error e 12))" )
12

(sci/eval-string* ctx "(try (assoc 1 1 1) (catch js/Object e 12))" )
Unable to resolve classname: js/Object

cljs.user=> (sci/eval-string* ctx "(try (assoc 1 1 1) (catch :default e 12))" )
Execution error (ExceptionInfo) at (<cljs repl>:1).
Unable to resolve classname: :default
@borkdude
Copy link
Collaborator Author

borkdude commented Jul 3, 2021

See babashka/scittle#14

borkdude added a commit that referenced this issue Jul 3, 2021
@borkdude borkdude closed this as completed Jul 3, 2021
@borkdude borkdude reopened this Jul 3, 2021
@borkdude borkdude closed this as completed Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant