[#312 allow .getMessage on ex-info (#313)

This commit is contained in:
Michiel Borkent 2020-03-28 08:29:03 +01:00 committed by GitHub
parent 1105c4676e
commit fe76cd352c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -13,7 +13,8 @@
;; (identical? os :mac))) ;; (identical? os :mac)))
(def classes (def classes
'{:all [java.io.BufferedReader '{:all [clojure.lang.ExceptionInfo
java.io.BufferedReader
java.io.BufferedWriter java.io.BufferedWriter
java.io.ByteArrayInputStream java.io.ByteArrayInputStream
java.io.ByteArrayOutputStream java.io.ByteArrayOutputStream
@ -112,8 +113,7 @@
:methods [borkdude.graal.LockFix ;; support for locking :methods [borkdude.graal.LockFix ;; support for locking
] ]
:fields [clojure.lang.PersistentQueue] :fields [clojure.lang.PersistentQueue]
:instance-checks [clojure.lang.ExceptionInfo :instance-checks [clojure.lang.IObj
clojure.lang.IObj
clojure.lang.IEditableCollection] clojure.lang.IEditableCollection]
:custom {clojure.lang.LineNumberingPushbackReader {:allPublicConstructors true :custom {clojure.lang.LineNumberingPushbackReader {:allPublicConstructors true
:allPublicMethods true} :allPublicMethods true}

View file

@ -378,6 +378,9 @@
(deftest download-and-extract-test (deftest download-and-extract-test
(is (= 6 (bb nil (io/file "test" "babashka" "scripts" "download_and_extract_zip.bb"))))) (is (= 6 (bb nil (io/file "test" "babashka" "scripts" "download_and_extract_zip.bb")))))
(deftest get-message-on-exception-info-test
(is "foo" (bb nil "(try (throw (ex-info \"foo\" {})) (catch Exception e (.getMessage e)))")))
;;;; Scratch ;;;; Scratch
(comment (comment