title: Erlang: starting sellaprime app with supervisor returns undef error
body: <p>Trying to run the example app, sellaprime app, from the programming erlang book. I tested the supervisor code with the testing function within the supervisor. So, the supervisor should be OK. The application gets loaded but the application start runs into problem with below error:</p>
  <pre><code>=INFO REPORT==== 31-May-2021::22:39:44.235167 ===
  application: sellaprime
  exited: {bad_return,
              {{sellaprime_app,start,[normal,[]]},
               {'EXIT',
                   {undef,
                       [{sellaprime_app,start,[normal,[]],[]},
                        {application_master,start_supervisor,3,
                            [{file,&quot;application_master.erl&quot;},{line,331}]},
                        {application_master,start_the_app,5,
                            [{file,&quot;application_master.erl&quot;},{line,313}]},
                        {application_master,start_it_new,7,
                            [{file,&quot;application_master.erl&quot;},
                             {line,299}]}]}}}}
  type: temporary
  </code></pre>
  <p>Need help locating the error.
  Here is the file, <code>sellaprime_app.erl</code>:</p>
  <pre><code>-module(sellaprime_app).
  -behaviour(application).
  -export([start/2, stop/1]).
  
  start(_Type, StartArgs) -&gt; sellaprime_supervisor:start_link(StartArgs).
  stop(_State) -&gt; ok.
  </code></pre>
  <p>and the <code>sellaprime_supervisor.erl</code>:</p>
  <pre><code>-module(sellaprime_supervisor).
  -behaviour(supervisor).
  
  -export([start/0, start_in_shell_for_testing/0, start_link/1, init/1]).
  
  start() -&gt; 
      spawn(fun() -&gt; supervisor:start_link({local, ?MODULE}, ?MODULE, _Arg=[]) end).
  start_in_shell_for_testing() -&gt; 
      {ok, Pid} = supervisor:start_link({local, ?MODULE}, ?MODULE, _Arg=[]),
      unlink(Pid).
  
  start_link(Args) -&gt; 
      supervisor:start_link({local, ?MODULE}, ?MODULE, Args).
  
  init([]) -&gt;
      gen_event:swap_handler(alarm_handler, {alarm_handler, swap}, {my_alarm_handler, xyz}),
      {ok, {{one_for_one, 3, 10},
           [{tag1, 
              {area_server, start_link, []},
              permanent, 
              10000, 
              worker, 
              [area_server]},
            {tag2, 
              {prime_server, start_link, []},
              permanent, 
              10000, 
              worker, 
              [prime_server]}
          ]}}.
  </code></pre>