Nicer formatting for safe_render errors
authorrinpatch <rinpatch@sdf.org>
Tue, 13 Aug 2019 22:15:18 +0000 (01:15 +0300)
committerrinpatch <rinpatch@sdf.org>
Tue, 13 Aug 2019 22:15:18 +0000 (01:15 +0300)
lib/pleroma/web/web.ex

index b42f6887e17b090535f9170f6703ee8ca9b6f2fa..6873465544b19fab1c9d31f88689708a52cbf87f 100644 (file)
@@ -58,10 +58,10 @@ defmodule Pleroma.Web do
       rescue
         error ->
           Logger.error(
-            "#{__MODULE__} failed to render #{inspect({view, template})}: #{inspect(error)}"
+            "#{__MODULE__} failed to render #{inspect({view, template})}\n" <>
+              Exception.format(:error, error, __STACKTRACE__)
           )
 
-          Logger.error(inspect(__STACKTRACE__))
           nil
       end