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
commit50a18a89fdd0fa19cb7d407117275284a8111759 (patch)
treebf1416c4fd12bb8d2fae4848c02d2b5e516cf876
parentfa2e2ffea4b357e4d34cb3d3211fb26d1a024132 (diff)
downloadrabbitmq-server-git-50a18a89fdd0fa19cb7d407117275284a8111759.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 99e058cb2a..d6a5f3cbac 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