summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2017-07-05 15:54:15 +0300
committerMichael Klishin <mklishin@pivotal.io>2017-07-05 15:54:15 +0300
commitb269f760662f264dcb482b58c832b93d4ae31a2c (patch)
treef62155a171b46145c70d59a1b8eeb62f34639a64 /src
parentdbc504d2e02ec0220365dde53b194969fa9b7910 (diff)
downloadrabbitmq-server-git-b269f760662f264dcb482b58c832b93d4ae31a2c.tar.gz
if rabbit_amqqueue_sup_sup:start_for_vhost/1 fails, log the reason and throw
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_amqqueue.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index bd6199c166..81eb5edf6e 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -235,12 +235,11 @@ recover(VHost) ->
{ok, OrderedRecoveryTerms} =
BQ:start(VHost, [QName || #amqqueue{name = QName} <- Queues]),
case rabbit_amqqueue_sup_sup:start_for_vhost(VHost) of
- {ok, _} ->
+ {ok, _} ->
recover_durable_queues(lists:zip(Queues, OrderedRecoveryTerms));
- %% a failure
- _ ->
- rabbit_log:error("Failed to start queue supervisors for vhost '~s', skipping queue recovery", [VHost]),
- []
+ {error, Reason} ->
+ rabbit_log:error("Failed to start queue supervisor for vhost '~s': ~s", [VHost, Reason]),
+ throw({error, Reason})
end.
stop(VHost) ->