Created
November 22, 2013 03:52
-
-
Save kevin-miles/7594572 to your computer and use it in GitHub Desktop.
throw or catch errors?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The best way to think about the difference between throwing errors and catching errors is this: you should catch errors only if you know exactly what to do next. The purpose of catching an error is to prevent the browser from responding in its default manner; the purpose of throwing an error is to provide information about why an error occurred. - Zakas, Nicholas C. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment