[erlang-questions] Exceptions in guards are blocked. Why?

Alexander Semenov <>
Thu Jan 29 14:14:20 CET 2009


Hi, folks,

Can you explain me why exceptions are blocked in guards?
For example I wrote this in erlang shell:

F = fun(X) when (X == 0) or (X / 0 > 2) -> true; (_) -> false end.
F(0).
false

Is this cause of 'side effects free' guards nature?
-- 
Alexander Semenov <>




More information about the erlang-questions mailing list