This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-16
Channels
- # announcements (2)
- # babashka (51)
- # beginners (165)
- # biff (39)
- # clara (1)
- # clj-kondo (20)
- # cljsrn (6)
- # clojure (64)
- # clojure-belgium (11)
- # clojure-conj (2)
- # clojure-europe (12)
- # clojure-nl (3)
- # clojure-norway (7)
- # clojure-uk (6)
- # clojurescript (11)
- # conf-proposals (1)
- # conjure (1)
- # core-async (19)
- # cursive (6)
- # data-science (16)
- # datomic (6)
- # deps-new (4)
- # fulcro (60)
- # funcool (3)
- # graalvm (9)
- # helix (14)
- # introduce-yourself (4)
- # jobs-discuss (13)
- # joyride (1)
- # kaocha (2)
- # malli (12)
- # off-topic (25)
- # polylith (9)
- # portal (3)
- # practicalli (1)
- # rdf (43)
- # re-frame (7)
- # reagent (5)
- # releases (5)
- # remote-jobs (8)
- # sci (5)
- # shadow-cljs (42)
- # squint (6)
- # xtdb (5)
I have a test case that calls (/ 1 0)
. I’m trying to print the error in a clean way. This doesn’t go well so far as sometimes I get an ExceptionInfo
and sometimes I get an java.lang.ArithmeticException
.
So far I have not been able to reproduce this with a simple eval-string
example, but looking at the code I think this has to do with Sci inlining (https://github.com/babashka/sci/issues/483). I wonder if can get access to the line and column of the caller consistently somehow
I’m not able to find it yet. It seems to be hidden in a few layers of complexity. And it’s not consistent :man-shrugging:
I did find this
(sci/eval-string "[(require 'foo)]" ) ;=> java.lang.Exception
(sci/eval-string "(require 'foo)" ) ;=> clojure.lang.ExceptionInfo
Not sure if that’s expected or not. As you suggested to wrap things in a vector earlier