summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2010-08-06 09:50:53 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2010-08-06 09:50:53 +0100
commit6f38f61d0c1842bd1b09a8401231b6c6bf0c3be9 (patch)
treebf1416c4fd12bb8d2fae4848c02d2b5e516cf876
parentcaf075e7aded58e520e624245b0d668139a32e6e (diff)
downloadrabbitmq-server-6f38f61d0c1842bd1b09a8401231b6c6bf0c3be9.tar.gz
all errors should be caught
A missing table results in the following warning =WARNING REPORT==== 6-Aug-2010::09:41:24 === schema integrity check failed: {aborted,{no_exists,rabbit_user,attributes}} moving database to backup location and recreating schema from scratch And a differently defined table gives this; =WARNING REPORT==== 6-Aug-2010::09:43:29 === schema integrity check failed: database_tables_incompatible moving database to backup location and recreating schema from scratch
-rw-r--r--src/rabbit_mnesia.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 99e058cb..d6a5f3cb 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -239,14 +239,15 @@ check_schema_integrity() ->
{_, TabDef} = proplists:lookup(Tab, TabDefs),
{_, ExpAttrs} = proplists:lookup(attributes, TabDef),
Attrs = mnesia:table_info(Tab, attributes),
- sets:is_subset(sets:from_list(ExpAttrs), sets:from_list(Attrs))
+ sets:is_subset(sets:from_list(ExpAttrs),
+ sets:from_list(Attrs))
end, table_names()) of
true -> ok;
false -> {error, database_tables_incompatible}
end
catch
- throw:Why ->
- {error, Why}
+ _:Reason ->
+ {error, Reason}
end.
%% The cluster node config file contains some or all of the disk nodes