Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

custom error nodejs

class Testing extends Error {
  constructor(message) {
    super(message);
    this.name = this.constructor.name;
    this.message = message;
    Error.captureStackTrace(this, this.constructor);
  }
}
 
PREVIOUS NEXT
Tagged: #custom #error #nodejs
ADD COMMENT
Topic
Name
1+8 =