[erlang-questions] handle_info stopped crashing if no match?

Fred Hebert mononcqc@REDACTED
Sat Feb 24 21:46:47 CET 2018


On 02/24, Vans S wrote:
>Something weird is going on, I am on the latest Erlang release from GitHub, 20.2, and my gen_servers stopped crashing?
>
>If I send a message to a gen_server and handle_info does not match the message, the message is ignored now?
>If this is the case, how to disable this behavior and go back to the fault tolerant stable way?
>
>If I want to make a catch-all for handle_info I will explicitly code that, if an unknown message comes to a gen_server this is
>a bug in my logic/code and I need to crash hard so I can fix it.  I am getting inconsistent states and hidden bugs after
>upgrading to 20.2.
>
>If I made a mistake here and Erlang still crashing if handle_info cannot match a message, excuse me and I 
>will dig deeper to what the problem can be.

This may be on purpose if this is a case where handle_info is not there 
at all (I personally disagree with this decision)  You can see the 
discussions leading up to it at: https://github.com/erlang/otp/pull/1346

If what you have is a handle_info function but you mean there's an 
implicit catch-all clause, then I have never seen that taking place.



More information about the erlang-questions mailing list