shouldn't assert
docstring make explicit the fact they will cause Errors to be thrown and not exceptions?
https://github.com/clojure/clojure/blob/clojure-1.10.2/src/clj/clojure/core.clj#L4806-L4807
the docstring is just wrong it seems in master
not an Exception -> https://docs.oracle.com/javase/7/docs/api/java/lang/AssertionError.html
I can send a patch if you'd like
actually there's already https://clojure.atlassian.net/browse/CLJ-2225
https://ask.clojure.org/index.php/4645/clojure-core-assert-docstring-is-incorrect is the best place to vote
here, I read exception (lower case e) as any kind of exception, not necessarily as "subclass of Exception"
but I'm on board with making it more precise
we look at bugs based (at least in part) on the number of votes on ask.clojure
Are Error
s subclasses of Exception
?
Looks like it’s its own branch under Throwable
.
Ah > not necessarily as “subclass of Exception” Misread that bit.
Seems not:
user=> (.isAssignableFrom Exception Error)
false
user=> (.isAssignableFrom Error Exception)
false
Voted 🙂