jsbin/lib/errors.js
2012-04-30 23:28:24 +01:00

10 lines
314 B
JavaScript

// Create a not found error object. This should at some point inherit
// from a HTTPError object with a nice .toJSON() method that can be
// used directly by handlers.
function NotFound() {
Error.apply(this, arguments);
}
NotFound.prototype = Object.create(Error.prototype);
module.exports.NotFound = NotFound;