In the following case, why the error message in one run with "exit exception" and the other starts with "exception error"?
1> spawn_link(fun ()-> exit(reason) end). ** exception exit: reason 2> spawn_link(fun ()-> timer:sleep(1), exit(reason) end). <0.38.0> ** exception error: reason
, Erlang. , - Erlang, , , . spawn_link, , , ( ). , .
, . , , , . , , , Pid, spawn_link, , . , , , - (- ). , .
:
1> spawn_link(fun ()-> timer:sleep(1), exit(reason) end), timer:sleep(1). ** exception exit: reason
, , , , .
errors-and-processes
1> link(spawn(fun() -> exit(reason) end)). ** exception exit: reason 2> link(spawn(fun() -> timer:sleep(1000), exit(reason) end)). true ** exception error: reason
-