summaryrefslogtreecommitdiff
path: root/src
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
commitab21f540889562a436dfc8d2d381965a3c22c854 (patch)
treeaeabc29243b674f8626d029a7cac346a309d39d9 /src
parenta9e9cfdf6cadfe4b8e996bb4db5a919c91f0b1ff (diff)
downloadrabbitmq-server-git-ab21f540889562a436dfc8d2d381965a3c22c854.tar.gz
exiting the VM from deep inside a function is uncool
Diffstat (limited to 'src')
-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 3caa13d73f..0d3dde8c51 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].