[erlang-questions] feedback please

Roelof Wobben r.wobben@REDACTED
Thu Sep 24 07:41:40 CEST 2015

Op 24-9-2015 om 07:23 schreef zxq9:
> On Thursday 24 September 2015 07:13:15 Roelof Wobben wrote:
>> Thanks for the feedback.
>> I understand the code and I see you use error handling. That Is the next
>> chapter I need to study.
>> So after that chapter I can change it to the code you build.  But L like
>> the way to handle the input a lot.
> That was an example of match-or-crash as error handling. Any place that code would have crashed is a place there wasn't a match, which meant something deeper than our expected input case was faulty -- and in that case it is better to stop execution and crash completely than carry on with crazy data or a screwed up underlying runtime.
> If the next chapter covers "error handling" it probably talks about how crashes are dealt with (and the link/monitor messages that are sent whenever a process crashes/exits) and how to use `try.. catch` to handle exceptions without crashing. There aren't very many places you will want to use try..catch (many folks make a point of trying very hard not to use it, myself included), but it is important to know.
> Have fun!
> -Craig
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> -----
> Geen virus gevonden in dit bericht.
> Gecontroleerd door AVG - www.avg.com
> Versie: 2015.0.6140 / Virusdatabase: 4419/10690 - datum van uitgifte: 09/24/15


You are right. I did take a quick look and almost the whole chapter is 
try .. catch.  So match or chrash is better ?


More information about the erlang-questions mailing list