File tree Expand file tree Collapse file tree
src/main/clojure/clojure/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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)]
Original file line number Diff line number Diff line change 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)
You can’t perform that action at this time.
0 commit comments