CustomError.js 569 B

12345678910111213
  1. /**
  2. * @summary A global custom error.
  3. * @constructor CustomError
  4. * @param {string} message - The message for the error.
  5. * @description As this is just a test file there is no implementation of inheriting the Error.prototype or fixing of the stack trace, this is a dummy dummy object to test the documentation.
  6. * @extends {Error} The default `Error` object.
  7. * @example {@caption Use this class like any standard error object.}
  8. * throw new CustomError("Oh no! It broke :(");
  9. */
  10. function CustomError(message){
  11. this.name = "CustomError";
  12. this.message = message;
  13. }