[erlang-questions] Erlang and Akka, The Sequel

José Valim jose.valim@REDACTED
Sat Apr 4 00:18:44 CEST 2015


> If the `await` function is wrapped in a `catch`, then the message won't
be handled properly.

We have actually discussed this extensively. We have decided to not handle
those cases because similar errors happen if you wrap a gen_server:call/3
in a catch. If you trigger the call timeout and catch it, the gen server is
going to eventually reply which will sit in your inbox. We believe there is
one httpc bug caused due to this (anti-)pattern.

(insert huge misplaced rant about catch)

So we could either use middleman processes for everything or document a
task is another process and catching can lead to idle messages regardless
of trap exits. We went with the latter.

I do agree with Fred this is trickier than it looks though, even more if
you are using lager and want nicely formatted error messages (then you need
to use proc_lib and what not).




-- 


*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Lead Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150404/4a56c2ea/attachment.htm>


More information about the erlang-questions mailing list