[erlang-questions] Handling unexpected messages (was Re: Erlang shell crashes)

Christian S <>
Mon Oct 30 12:12:19 CET 2006

On 10/30/06, Ben Butler-Cole <> wrote:
> I'm writing my first Erlang system and need to decide general policies for this kind of thing. Is there not an argument for exiting if you get an unexpected message rather than just ignoring it? I suppose that opens you up to a denial of service attack if your Pids or process names aren't completely secure.

If you have malicious code in your erlang system it can do far worse
things. All code in an erlang system is granted access to every
corner. There is no such things as secure pids or process names to it.

Yes it is probably a good idea to crash on the unexpected. Write
programs for the expected and crash when expectations aren't met.
Continuing a program when something unexpected has happened is to walk
on thin ice on a lake of undefined behavior.

More information about the erlang-questions mailing list