improve error message

pull/1/head
jem 5 years ago
parent dfb35e06f0
commit 20ad5b2394

@ -42,5 +42,6 @@
(try
(read-data (io/resource file-path))
(catch IllegalArgumentException e
(throw (ex-info "unable to load test spec" {:cause e
:file-path file-prefix}))))))
(throw (ex-info (str "Could not find test spec on " file-path)
{:cause e
:file-path file-prefix}))))))

@ -36,5 +36,5 @@
(sut/load-test-data (sut/data-file-prefix ::test-it)))))
(deftest should-throw-exception
(is (thrown? Exception
(is (thrown? RuntimeException
(sut/load-test-data (sut/data-file-prefix ::not-existing)))))

Loading…
Cancel
Save