not-found-error

A simple NotFoundError constructor

Usage no npm install needed!

<script type="module">
  import notFoundError from 'https://cdn.skypack.dev/not-found-error';
</script>

README

NotFoundError

When you've lost something

Dependency Status devDependency Status

An exception for use in certain situations (e.g. to signal HTTP 404 error). Created because of a need for a cross-package standard exception.

Getting started

Install the package with this command:

npm install not-found-error --save

Usage

// Import ES6-style
import NotFoundError from 'not-found-error';

// Or CommonJS-style
const NotFoundError = require('not-found-error');

// Then just use like this:
throw new NotFoundError();

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style.

License

Copyright (c) 2016 Rafał Ruciński. Licensed under the WTFPL license.