Skip to content

Instantly share code, notes, and snippets.

@archaelus
Created August 19, 2010 22:01
Show Gist options
  • Save archaelus/539050 to your computer and use it in GitHub Desktop.
Save archaelus/539050 to your computer and use it in GitHub Desktop.
start(App) ->
start_ok(App, application:start(App)).
start_ok(_App, ok) -> ok;
start_ok(_App, {error, {already_started, _App}}) -> ok;
start_ok(App, {error, {not_started, Dep}}) ->
ok = start(Dep),
start(App);
start_ok(App, {error, Reason}) ->
erlang:error({app_start_failed, App, Reason}).
@wmw
Copy link

wmw commented Aug 19, 2010

I miss erlang. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment