]> granicus.if.org Git - ejabberd/commitdiff
* src/ejabberd_config.erl: Report human-readable message when
authorBadlop <badlop@process-one.net>
Sat, 8 Dec 2007 18:39:23 +0000 (18:39 +0000)
committerBadlop <badlop@process-one.net>
Sat, 8 Dec 2007 18:39:23 +0000 (18:39 +0000)
Mnesia spool files are not readable.

SVN Revision: 1053

ChangeLog
src/ejabberd_config.erl

index c15ddf3e5ea606069af1dd2d222c3fb331a60f48..b149315b18f638df1afc20d6e4600ccb8c8141d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-08  Badlop  <badlop@process-one.net>
+
+       * src/ejabberd_config.erl: Report human-readable message when
+       Mnesia spool files are not readable.
+
 2007-12-08  Mickael Remond  <mremond@process-one.net>
 
        * src/ejabberd_s2s_out.erl: Increase dialback timeout as dialback can
index 3147f0a1b74fabf7ef70cfb25938101bfc2a3cfe..41cb7f9d1a0c902b227d2a0e8753dea42d8933d3 100644 (file)
@@ -239,7 +239,20 @@ set_opts(State) ->
                                      mnesia:write(R)
                              end, Opts)
        end,
-    {atomic, _} = mnesia:transaction(F).
+    case mnesia:transaction(F) of
+       {atomic, _} -> ok;
+       {aborted,{no_exists,Table}} ->
+           MnesiaDirectory = mnesia:system_info(directory),
+           ?ERROR_MSG("Error reading Mnesia database spool files:~n"
+                      "The Mnesia database couldn't read the spool file for the table '~p'.~n"
+                      "ejabberd needs read and write access in the directory:~n   ~s~n"
+                      "Maybe the problem is a change in the computer hostname,~n"
+                      "or a change in the Erlang node name, which is currently:~n   ~p~n"
+                      "Check the ejabberd guide for details about changing the~n"
+                      "computer hostname or Erlang node name.~n",
+                      [Table, MnesiaDirectory, node()]),
+           exit("Error reading Mnesia database")
+    end.
 
 
 add_global_option(Opt, Val) ->