summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Jones <pauljones23@gmail.com>2009-07-24 21:30:42 +0100
committerPaul Jones <pauljones23@gmail.com>2009-07-24 21:30:42 +0100
commit2ff75e6fa266667821d40f00a39c67cf632a0667 (patch)
tree23a877b6dd2824653d334e84499a705177f875d6
parentdea4af444b855c1eb0fe521853893f52cefb5d53 (diff)
downloadrabbitmq-server-2ff75e6fa266667821d40f00a39c67cf632a0667.tar.gz
Eliminated error macro; changed location of error printout
-rw-r--r--src/rabbit_plugin_activator.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_plugin_activator.erl b/src/rabbit_plugin_activator.erl
index 2769d3c4..71278bfb 100644
--- a/src/rabbit_plugin_activator.erl
+++ b/src/rabbit_plugin_activator.erl
@@ -37,7 +37,6 @@
-define(DefaultUnpackedPluginDir, "priv/plugins").
-define(DefaultRabbitEBin, "ebin").
-define(BaseApps, [rabbit]).
--define(Error(F, V), io:format("ERROR: " ++ F, V)).
%%----------------------------------------------------------------------------
@@ -61,8 +60,9 @@ start() ->
%% Build the entire set of dependencies - this will load the
%% applications along the way
AllApps = case catch sets:to_list(expand_dependencies(RequiredApps)) of
- {unknown_app, _} ->
- ?Error("Failed to expand dependencies.~n", []),
+ {unknown_app, {App, Err}} ->
+ io:format("ERROR: Failed to load application " ++
+ "~s: ~p~n", [App, Err]),
halt(1);
AppList ->
AppList
@@ -190,8 +190,7 @@ expand_dependencies(Current, [Next|Rest]) ->
{error, {already_loaded, _}} ->
ok;
X ->
- ?Error("Failed to load ~s: ~p~n", [Next, X]),
- throw({unknown_app, Next})
+ throw({unknown_app, {Next, X}})
end,
{ok, Required} = application:get_key(Next, applications),
Unique = [A || A <- Required, not(sets:is_element(A, Current))],