Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[usability] more helpful missing config message #105

Closed
bryanhuntesl opened this issue Aug 18, 2019 · 1 comment
Closed

[usability] more helpful missing config message #105

bryanhuntesl opened this issue Aug 18, 2019 · 1 comment

Comments

@bryanhuntesl
Copy link
Contributor

In the case that the config is missing the crash report/message is terrifying for new users.

It might be worthwhile to add a pre-flight check and print something more like :

libcluster -> missing config x 
21:54:49.998 [error] CRASH REPORT Process <0.374.0> with 0 neighbours crashed with reason: #{'__exception__' => true,'__struct__' => 'Elixir.Protocol.UndefinedError',description 
=> <<>>,protocol => 'Elixir.Enumerable',value => nil} in 'Elixir.Enumerable':'impl_for!'/1 line 1                                                                                 
21:54:49.998 [error] Supervisor noslides_sup had child 'Elixir.Cluster.Supervisor' started with 'Elixir.Cluster.Supervisor':start_link([nil,[{name,'Elixir.NoSlides.ClusterSuperviso
r'}]]) at undefined exit with reason #{'__exception__' => true,'__struct__' => 'Elixir.Protocol.UndefinedError',description => <<>>,protocol => 'Elixir.Enumerable',value => nil} 
in 'Elixir.Enumerable':'impl_for!'/1 line 1 in context start_error                                                                                                                
                                                                                                                                                                                  
21:54:50.014 [error] Unable to start NoSlides supervisor because: {:shutdown, {:failed_to_start_child, Cluster.Supervisor, {%Protocol.UndefinedError{description: "", protocol: Enu
merable, value: nil}, [{Enumerable, :impl_for!, 1, [file: 'lib/enum.ex', line: 1]}, {Enumerable, :reduce, 3, [file: 'lib/enum.ex', line: 141]}, {Enum, :reduce, 3, [file: 'lib/enu
m.ex', line: 3023]}, {Cluster.Supervisor, :get_configured_topologies, 1, [file: 'lib/supervisor.ex', line: 62]}, {Cluster.Supervisor, :init, 1, [file: 'lib/supervisor.ex', line: 
57]}, {:supervisor, :init, 1, [file: 'supervisor.erl', line: 295]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server
.erl', line: 342]}]}}}                                                                                                                                                            
21:54:50.014 [error] CRASH REPORT Process <0.371.0> with 0 neighbours exited with reason: bad return value ok from 'Elixir.NoSlides.Application':start(normal, []) in application_m
aster:init/4 line 138                                                                                                                                                             
21:54:50.014 [info] Application noslides exited with reason: bad return value ok from 'Elixir.NoSlides.Application':start(normal, [])                                               
** (Mix) Could not start application noslides: NoSlides.Application.start(:normal, []) returned a bad value: :ok                                                                    
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed                                                          
@bitwalker
Copy link
Owner

Agreed, I don't know that it is practical to have super friendly messages for every possible missing config item, but we can definitely catch the major ugliness like in your example.

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

No branches or pull requests

2 participants