aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2007-12-08 18:39:23 +0000
committerBadlop <badlop@process-one.net>2007-12-08 18:39:23 +0000
commit6b8113c56f99110544bb8dbd2af8d8b4f697524a (patch)
tree68eca53acfd417fbb1f69a8bbb4993d8b743b923 /src
parent* src/ejabberd_s2s_out.erl: Increase dialback timeout as dialback can (diff)
* src/ejabberd_config.erl: Report human-readable message when
Mnesia spool files are not readable. SVN Revision: 1053
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_config.erl15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl
index 3147f0a1b..41cb7f9d1 100644
--- a/src/ejabberd_config.erl
+++ b/src/ejabberd_config.erl
@@ -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) ->