Skip to content

Commit

Permalink
Fixed bug in example app plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Licenser committed Mar 17, 2013
1 parent d4cc969 commit 02aeca1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions plugins/example_app/example_app.erl
@@ -1,6 +1,6 @@
-module(example_app).

-export([start/0]).
-export([start/1]).

start() ->
example_app_app:start([],[]).
start(_Config) ->
example_app_app:start(ok,ok).
4 changes: 3 additions & 1 deletion src/eplugin_srv.erl
Expand Up @@ -185,6 +185,8 @@ load_modules(Name, _Path, []) ->

load_modules(Name, Path, [{M, _RegisterFor} | Modules]) ->
File = filename:join([Path, M]),
% code:delete(M),
% code:purge(M),
case code:load_abs(File) of
{error, Reason} ->
lager:error("[eplugin::~p] Failed to load module ~p(~s): ~p.", [Name, M, File, Reason]),
Expand All @@ -211,7 +213,7 @@ compile_modules(Name, Path, [{M, _RegisterFor} | Modules]) ->
compile_module(Name, Path, Module) ->
File = filename:join([Path, Module]),
lager:info("[eplugin::~p] Compiling module ~s", [Name, File]),
case compile:file(File, [{outdir, Path}]) of
case compile:file(File, [{outdir, Path}, warnings_as_errors]) of
error ->
lager:error("[eplugin::~p] Compiling failed.", [Name]),
{error, unknown};
Expand Down

0 comments on commit 02aeca1

Please sign in to comment.