MCPcopy Create free account
hub / github.com/ahmedemad3/nodejs-apps / constructor

Method constructor

error/base.error.js:2–11  ·  view source on GitHub ↗
(name , httpStatusCode , description , isOperational)

Source from the content-addressed store, hash-verified

1class BaseError extends Error {
2 constructor(name , httpStatusCode , description , isOperational){
3 super(description);
4 Object.setPrototypeOf(this , new.target.prototype)
5 this.name = name;
6 this.httpStatusCode = httpStatusCode;
7 this.description = description;
8 this.isOperational = isOperational;
9
10 Error.captureStackTrace(this);
11 }
12}
13
14module.exports = BaseError

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected