🐛 Add more generic error handing to svgparse.

This commit is contained in:
Andrey Antukh 2021-02-15 20:27:46 +01:00 committed by Andrés Moya
parent 0f35906930
commit 2e084cc2a6

View file

@ -124,7 +124,7 @@
(try (try
(with-open [istream (IOUtils/toInputStream data "UTF-8")] (with-open [istream (IOUtils/toInputStream data "UTF-8")]
(xml/parse istream)) (xml/parse istream))
(catch org.xml.sax.SAXParseException _e (catch Exception _e
(ex/raise :type :validation (ex/raise :type :validation
:code :invalid-svg-file)))) :code :invalid-svg-file))))