web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
419 B

  1. 'use strict';
  2. class ParserError extends Error {
  3. constructor(message) {
  4. super(message);
  5. this.name = this.constructor.name;
  6. this.message = message || 'An error ocurred while parsing.';
  7. if (typeof Error.captureStackTrace === 'function') {
  8. Error.captureStackTrace(this, this.constructor);
  9. }
  10. else {
  11. this.stack = (new Error(message)).stack;
  12. }
  13. }
  14. }
  15. module.exports = ParserError;