Fix up the ensure_started code

This commit is contained in:
Kresten Krab Thorup 2014-11-26 13:21:53 +01:00
parent 752f9f5b62
commit 0fa8ab4a02

View file

@ -448,9 +448,12 @@ do_transact(TransactionSpec, State=#state{ nursery=Nursery, top=Top }) ->
{ok, State#state{ nursery=Nursery2 }}.
start_app() ->
application:start(syntax_tools),
application:start(plain_fsm),
case application:start(?MODULE) of
ok = ensure_started(syntax_tools),
ok = ensure_started(plain_fsm),
ok = ensure_started(?MODULE).
ensure_started(Application) ->
case application:start(Application) of
ok ->
ok;
{error, {already_started, _}} ->