Skip to content

Instantly share code, notes, and snippets.

@nicholasf
Created February 7, 2014 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicholasf/8874340 to your computer and use it in GitHub Desktop.
Save nicholasf/8874340 to your computer and use it in GitHub Desktop.
defmodule Spoonbot do
use Application.Behaviour
def start(_type, _args) do
bot_hello = BotSpeak.new(pattern: "hello", doer: fn -> IO.puts "hi" end)
Bridge.IRC.run(bot_hello)
Spoonbot.Supervisor.start_link
end
end
defrecord BotSpeak, pattern: nil, doer: nil
@nicholasf
Copy link
Author

This throws:

=INFO REPORT==== 8-Feb-2014::10:47:42 ===
    application: spoonbot
    exited: {bad_return,
                {{'Elixir.Spoonbot',start,[normal,[]]},
                 {'EXIT',
                     {undef,
                         [{'Elixir.Bridge.IRC',run,
                              [{'Elixir.BotSpeak',<<"hello">>,
                                   #Fun<Elixir.Spoonbot.0.73827715>}],
                              []},
                          {'Elixir.Spoonbot',start,2,
                              [{file,"lib/spoonbot.ex"},{line,6}]},
                          {application_master,start_it_old,4,
                              [{file,"application_master.erl"},
                               {line,269}]}]}}}}
    type: temporary
** (Mix) Could not start application spoonbot: {:bad_return, {{Spoonbot, :start, [:normal, []]}, {:EXIT, {:undef, [{Bridge.IRC, :run, [BotSpeak[pattern: "hello", doer: #Function<0.73827715 in Spoonbot.start/2>]], []}, {Spoonbot, :start, 2, [file: 'lib/spoonbot.ex', line: 6]}, {:application_master, :start_it_old, 4, [file: 'application_master.erl', line: 269]}]}}}}

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