Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Please don't perpetuate the else silliness of the (intentionally bad) first example there. Stick a return in front of the log calls, lose the else, and unindent all following.


Yes, that is of course preferable. There are much better error handling strategies than what the example gave.

I was only commenting on the readability aspect, all other things being equal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: