XML: handle erlang errors too
authorWilliam Pitcock <nenolod@dereferenced.org>
Fri, 1 Jun 2018 17:55:25 +0000 (17:55 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 6 Jun 2018 16:27:13 +0000 (16:27 +0000)
lib/pleroma/web/xml/xml.ex

index 36430a3faf9379c9f52d332b8e01ff6780b825ef..da3f68ecba51f22ba966665944f37feb908c2cdf 100644 (file)
@@ -32,6 +32,10 @@ defmodule Pleroma.Web.XML do
       :exit, _error ->
         Logger.debug("Couldn't parse XML: #{inspect(text)}")
         :error
+    rescue
+      e ->
+        Logger.debug("Couldn't parse XML: #{inspect(text)}")
+        :error
     end
   end
 end