@house-agency/brewstore
Version:
The Brewery Storage
18 lines (14 loc) • 371 B
JavaScript
const inherits = require('util').inherits;
function EmptyRecordError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor;
this.message = message;
this.extra = extra;
}
module.exports = [
EmptyRecordError
].reduce((exp, err) => {
inherits(err, Error);
exp[err.name] = err;
return exp;
}, {});