Added a way to distinguish port exit in error tuples

This commit is contained in:
Alexey Romanov
2012-06-18 14:36:54 +04:00
parent 7110748ef5
commit c8d711a53e

View File

@@ -1069,7 +1069,7 @@ wait_result(Port) ->
{Port, Reply} -> {Port, Reply} ->
Reply; Reply;
{'EXIT', Port, Reason} -> {'EXIT', Port, Reason} ->
{error, Reason}; {error, {port_exit, Reason}};
Other when is_tuple(Other), element(1, Other) =/= '$gen_call', element(1, Other) =/= '$gen_cast' -> Other when is_tuple(Other), element(1, Other) =/= '$gen_call', element(1, Other) =/= '$gen_cast' ->
Other Other
end. end.