elixir function Kernel.exit/1 delegates to erlang exit/1 while Process.exit/2 delegates to erlang exit/2.
if you read the erlang documentation:
exit/1 raises an exception:
Raises an exception of class
exitwith exit reasonReason.
erlang — OTP 29.0.2 (erts 17.0.2)
while exit/2 sends an exit signal:
Sends an exit signal with exit reason
Reasonto the process or port identified byPid.
erlang — OTP 29.0.2 (erts 17.0.2)
that’s why a catch can handle an exit/1 call but not an exit/2.
You can get more details on erlang doc for processes:






















