Fix exception handling
This commit is contained in:
parent
44471c97ec
commit
9835b02785
4 changed files with 15 additions and 4 deletions
|
|
@ -1 +1 @@
|
||||||
0.0.75
|
0.0.76
|
||||||
|
|
@ -1 +1 @@
|
||||||
0.0.76
|
0.0.77-SNAPSHOT
|
||||||
2
sci
2
sci
|
|
@ -1 +1 @@
|
||||||
Subproject commit aa73bdef358a089733f9e20b1673c551f3ccdd6b
|
Subproject commit 17b14cae6260ad56a37fb3f46de16255ae90f9b8
|
||||||
|
|
@ -228,7 +228,18 @@
|
||||||
(is (= {:result 8080} (bb nil "test/babashka/scripts/tools.cli.bb"))))
|
(is (= {:result 8080} (bb nil "test/babashka/scripts/tools.cli.bb"))))
|
||||||
|
|
||||||
(deftest try-catch-test
|
(deftest try-catch-test
|
||||||
(is (zero? (bb nil "(try (/ 1 0) (catch ArithmeticException _ 0))"))))
|
(is (zero? (bb nil "(try (/ 1 0) (catch ArithmeticException _ 0))")))
|
||||||
|
(is (= :got-it (bb nil "
|
||||||
|
(defn foo []
|
||||||
|
(throw (java.util.MissingResourceException. \"o noe!\" \"\" \"\")))
|
||||||
|
|
||||||
|
(defn bar
|
||||||
|
[]
|
||||||
|
(try (foo)
|
||||||
|
(catch java.util.MissingResourceException _
|
||||||
|
:got-it)))
|
||||||
|
(bar)
|
||||||
|
"))))
|
||||||
|
|
||||||
(deftest reader-conditionals-test
|
(deftest reader-conditionals-test
|
||||||
(is (= :hello (bb nil "#?(:bb :hello :default :bye)")))
|
(is (= :hello (bb nil "#?(:bb :hello :default :bye)")))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue