function create30thLinkError() {
  var err = new Error("Page doesn't have 30th link");
  err.code = '30THLINK';
  return err;
}
DISCLAIMER
This is a relatively simple example, to illustrate some of the
  possible functionalities and how to achieve them.
  There is no guarantee that this example will provide useful
  results.
  Use this example with and at your own responsibility.

In this example we run through some urls and try to extract their
  30th link. It demonstrates how to deal with errors.

To run:
'node ErrorHandling.js'