Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

custom error js

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 #js
ADD COMMENT
Topic
Name
3+4 =