@borkdude, which is the standard way to add a non-included java class? I am thinking of java.time.format.DateTimeParseException, which is missing in cljc.java-time. Or is it something that can only be done within babashka.impl.classes, unless I require an external clojure project as documented?
@kingcode The only way is to add it to babashka itself or to a pod
Ok Thanks @jeroenvandijk, will look into it.
the namespace babashka.impl.classes
is indeed the place where you have to add the class
ok…maybe doing my own bb build…?
@kingcode What do you mean "missing in cljc.java-time"?
It is not available e.g. with
(require '[cljc.java-time.format.date-time-parse-exception])
When looking at the source, that ns has not been provided (as part of the mapping from java.time as documented in cljc.java-time README)So I tried importing the Java class directly.
ok, so you want to catch that specific exception
I also looked at D3/java-time, but it seems to work completely differently than cljc.java-time, by wrapping its own semantics as a facade around Java…
Correct
if the exception is not part of bb, a PR is welcome. since bb supports java.time, the exception type is a good addition
I want my user’s to be able to use a variety of formats and parse them all until one works, and catching each parse exc. by going to the next format
OK Thanks! Not urgent by any means, I am playing around right now. Not familiar with PR process, will look it up and get back to you.
Have to log off. Thanks..
I'll take care of this one, so it will be part of 0.2.0
@kingcode new binaries are in #babashka_circleci_builds, the exception is now included on the master branch