Home

Awesome

JavaScript error handling examples

This is a collection of various JavaScript error handling techniques.

Usage

Run a file without arguments to watch it fail; pass an argument for success.

$ ./promises.js
Letter not sent: Cannot reach address empty
$ ./promises.js London
Letter sent with code XYZ-London

Read more

This code accompanies the blog post Asynchronous error handling in JavaScript, which discusses the use case.