summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-08-08 05:25:40 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-08-08 05:25:40 +0100
commitf030fef7be26d69e149f47087588d5b2b1869394 (patch)
treeaeabc29243b674f8626d029a7cac346a309d39d9
parent9a72e8980bbabd97cd9ecbc37baa4c799dc64dd9 (diff)
downloadrabbitmq-server-f030fef7be26d69e149f47087588d5b2b1869394.tar.gz
exiting the VM from deep inside a function is uncool
-rw-r--r--src/rabbit_plugins.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl
index 3caa13d7..0d3dde8c 100644
--- a/src/rabbit_plugins.erl
+++ b/src/rabbit_plugins.erl
@@ -126,13 +126,13 @@ prepare_plugins(EnabledFile, PluginsDistDir, ExpandDir) ->
%% Eliminate the contents of the destination directory
case delete_recursively(ExpandDir) of
ok -> ok;
- {error, E} -> rabbit_misc:quit("Could not delete dir ~s (~p)",
- [ExpandDir, E])
+ {error, E} -> throw({error, {cannot_delete_plugins_expand_dir,
+ [ExpandDir, E]}})
end,
case filelib:ensure_dir(ExpandDir ++ "/") of
- ok -> ok;
- {error, E2} -> rabbit_misc:quit("Could not create dir ~s (~p)",
- [ExpandDir, E2])
+ ok -> ok;
+ {error, E} -> throw({error, {cannot_create_plugins_expand_dir,
+ [ExpandDir, E]}})
end,
[prepare_plugin(Plugin, ExpandDir) || Plugin <- ToUnpackPlugins].