Skip to content

Commit

Permalink
Improve error during analysis, #34
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Aug 31, 2022
1 parent ef34e84 commit cfac8db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:deps
{org.clojure/clojure {:mvn/version "1.10.3"}
org.babashka/sci {:git/url "https://github.com/babashka/sci"
:git/sha "133a7565749ac6cd5a8308182f0b1c7fc47e8a3d"}
:git/sha "6bbfec0ede429fc17cb9ba51a96582b4fcd6ea69"}
#_{:local/root "../babashka/sci"}
reagent/reagent {:mvn/version "1.1.0"}
cljsjs/react {:mvn/version "17.0.2-0"}
Expand Down
18 changes: 2 additions & 16 deletions resources/public/html/local.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,8 @@
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
<script src="../js/scittle.reagent.js" type="application/javascript"></script>
<script type="application/x-scittle">
(require '[sci.core :as sci])
(defn try-load-string [s]
(try
(js/scittle.core.eval_string s)
(catch ^:sci/error js/Error e
(run! println (-> (sci/stacktrace e) (sci/format-stacktrace))))))

(try-load-string "
(defn f []
(subs nil 42))

(defn g []
(f))

(g)
")
(defn f [x]
(inc n))
</script>
</head>
<body>
Expand Down

0 comments on commit cfac8db

Please sign in to comment.