The difference to raising an exception instead of calling exit is that the exception is printed directly from the
child process (at least seems like it). But it is also captured by the parent process together with the message from
the child.

Intersting finding. When I don’t wait for the messages, that is comment out the check_for_message and call
Crash2.exs after that with check_for_message the messages from the previous call are also captured. It seems the messages keep hanging around until someone is reading them.

I just wanted to mention that exercises-3 and 4 should not trap the exit as in Pierre Sugar solution. It defeats the purpose on what the author is trying to convey.

3 should show that performs an exit
4 should show that an exception is raised

exercise 5 should show that the exit was actually trapped by spawning the process with spawn_monitor. The author mentioned that spawn_link should be used when you do not need to trap the program meaning let it fail, while spawn_monitor allows you to continue on.

The next exercise should show that the message was receive.

I just wanted to post this so readers do not get confused as I did when viewing solutions.