diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-08-06 09:50:53 +0100 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-08-06 09:50:53 +0100 |
commit | 6f38f61d0c1842bd1b09a8401231b6c6bf0c3be9 (patch) | |
tree | bf1416c4fd12bb8d2fae4848c02d2b5e516cf876 /src/rabbit_mnesia.erl | |
parent | caf075e7aded58e520e624245b0d668139a32e6e (diff) | |
download | rabbitmq-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
Diffstat (limited to 'src/rabbit_mnesia.erl')
-rw-r--r-- | src/rabbit_mnesia.erl | 7 |
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 |