Skip to content

Instantly share code, notes, and snippets.

@kevin-miles
Created November 22, 2013 03:52
Show Gist options
  • Save kevin-miles/7594572 to your computer and use it in GitHub Desktop.
Save kevin-miles/7594572 to your computer and use it in GitHub Desktop.
throw or catch errors?
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