Skip to content

Commit b0e0928

Browse files
committed
Report errors that happens when starting p1_utils app
1 parent 929cc8d commit b0e0928

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/p1_queue.erl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@
3131
%%%===================================================================
3232
-spec start(file:filename()) -> ok | {error, any()}.
3333
start(Dir) ->
34-
application:ensure_all_started(p1_utils),
35-
case p1_file_queue:start(Dir) of
36-
{ok, _} -> ok;
37-
{error, {already_started, _}} -> ok;
38-
Err -> Err
34+
case application:ensure_all_started(p1_utils) of
35+
{ok, _} ->
36+
case p1_file_queue:start(Dir) of
37+
{ok, _} -> ok;
38+
{error, {already_started, _}} -> ok;
39+
Err -> Err
40+
end;
41+
Err -> Err
3942
end.
4043

4144
-spec stop() -> ok | {error, any()}.

0 commit comments

Comments
 (0)