Skip to content

Commit 023314a

Browse files
Dimitri Fedorovbendlas
authored andcommitted
DXML-59: Typo in throw in clojure.data.xml.js.dom
1 parent e03f099 commit 023314a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/clojure/clojure/data/xml.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
;; see http://stackoverflow.com/questions/11563554/how-do-i-detect-xml-parsing-errors-when-using-javascripts-domparser-in-a-cross
2727
[s & {:keys [content-type on-error raw]
2828
:or {content-type "text/xml"
29-
on-error #(throw "XML parser error" {:doc % :input s})}}]
29+
on-error #(throw (ex-info "XML parser error" {:doc % :input s}))}}]
3030
(let [dom (. (js/DOMParser.)
3131
(parseFromString s content-type))
3232
doc (.-documentElement dom)]

src/main/clojure/clojure/data/xml/js/dom.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
:tag (dom-element-tag el)
174174
:attrs (.-attributes el)
175175
:content (.-childNodes el)
176-
(throw "XML tag has no key" {:key k :el el})))
176+
(throw (ex-info "XML tag has no key" {:key k :el el}))))
177177
([el k nf]
178178
#_(println "Element" k "=>" (case k
179179
:tag (dom-element-tag el)

0 commit comments

Comments
 (0)