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

I love Exceptions as control flow! Thanks for the suggestion.

I too use specialized exceptions. Some have friendly messages that can be displayed to the user, like "Please fill the password". But critical exceptions display a generic error to the user ("Ops, sorry something went wrong on our side...") but log specifics to devs, like database connection errors, for example.





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

Search: