Fix how the name/pid of the process is printed in crash reports
Before this fix, the code assumed that processes without a registered
name omitted the {registered_name, X} tuple in the crash report. In
actual fact, process_info/2 returns [] when the process has no
registered name, so unregistered processes were being printed with a
"name" of "[]". This corrects the code to print the Pid in this case
instead.
Expected=lists:flatten(io_lib:format("[error] ~w CRASH REPORT Process ~w with 0 neighbours crashed with reason: maximum number of file descriptors exhausted, check ulimit -n",[self(),self()])),
Expected=lists:flatten(io_lib:format("[error] ~w CRASH REPORT Process ~w with 0 neighbours crashed with reason: system limit: maximum number of processes exceeded",[self(),self()])),
Expected=lists:flatten(io_lib:format("[error] ~w CRASH REPORT Process ~w with 0 neighbours crashed with reason: system limit: maximum number of processes exceeded",[self(),self()])),
Expected=lists:flatten(io_lib:format("[error] ~w CRASH REPORT Process ~w with 0 neighbours crashed with reason: system limit: maximum number of ports exceeded",[self(),self()])),
Expected=lists:flatten(io_lib:format("[error] ~w CRASH REPORT Process ~w with 0 neighbours crashed with reason: system limit: tried to create an atom larger than 255, or maximum atom count exceeded",[self(),self()])),
Expected=lists:flatten(io_lib:format("[error] ~w CRASH REPORT Process ~w with 0 neighbours crashed with reason: system limit: maximum number of ETS tables exceeded",[self(),self()])),
Expected=lists:flatten(io_lib:format("[error] ~w CRASH REPORT Process ~w with 0 neighbours crashed with reason: system limit: maximum number of ETS tables exceeded",[self(),test])),