[erlang-patches] Improve error message for duplicate node name

Magnus Henoch magnus@REDACTED
Fri Jan 25 18:01:39 CET 2013


I'm sure you've seen this error message once too many:

{error_logger,{{2013,1,25},{16,0,42}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1,[{file,"inet_tcp_dist.erl"},{line,70}]},{net_kernel,start_protos,4,[{file,"net_kernel.erl"},{line,1314}]},{net_kernel,start_protos,3,[{file,"net_kernel.erl"},{line,1307}]},{net_kernel,init_node,2,[{file,"net_kernel.erl"},{line,1197}]},{net_kernel,init,1,[{file,"net_kernel.erl"},{line,357}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,297}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}]}

With this patch, you can get this message instead:

{error_logger,{{2013,1,25},{16,40,41}},"Protocol: ~tp: the name foo@REDACTED seems to be in use by another Erlang node",["inet_tcp"]}

git fetch git://github.com/legoscia/otp.git duplicate_name_error_message

https://github.com/legoscia/otp/compare/erlang:master...legoscia:duplicate_name_error_message
https://github.com/legoscia/otp/compare/erlang:master...legoscia:duplicate_name_error_message.patch

Regards,
Magnus



More information about the erlang-patches mailing list