Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 2x | /** ExpressError extends the normal JS error so we can easily * add a status when we make an instance of it. * * The error-handling middleware will return this. */ class ExpressError extends Error { constructor(message, status) { super(); this.message = message; this.status = status; console.error(this.stack); } } module.exports = ExpressError; |