Improve error during analysis, #34
This commit is contained in:
parent
ef34e84e59
commit
cfac8dbaa5
2 changed files with 3 additions and 17 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue