]> granicus.if.org Git - ejabberd/commitdiff
Improve ejd2sql logging
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 27 Oct 2017 05:59:49 +0000 (08:59 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 27 Oct 2017 05:59:49 +0000 (08:59 +0300)
src/ejd2sql.erl

index 048787c08c239c5e68d97ebd48179a4205e669f9..79533421eea72711245f8eab2dc2f734970cf9c2 100644 (file)
@@ -86,6 +86,11 @@ export(Server, Output, Module1) ->
       fun({Table, ConvertFun}) ->
               case export(LServer, Table, IO, ConvertFun) of
                   {atomic, ok} -> ok;
+                 {aborted, {no_exists, _}} ->
+                     ?WARNING_MSG("Ignoring export for module ~s: "
+                                  "Mnesia table ~s doesn't exist (most likely "
+                                  "because the module is unused)",
+                                  [Module1, Table]);
                   {aborted, Reason} ->
                       ?ERROR_MSG("Failed export for module ~p and table ~p: ~p",
                                  [Module, Table, Reason])