plugin-errors.js 1.0 KB

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.MissingPluginError = exports.WhitespacePluginError = void 0;
  4. class WhitespacePluginError extends Error {
  5. constructor(pluginName, data = {}) {
  6. super(`Whitespace found in plugin name '${pluginName}'`);
  7. this.__proto__ = Error;
  8. this.messageTemplate = 'whitespace-found';
  9. this.messageData = {};
  10. this.messageData = data;
  11. Object.setPrototypeOf(this, WhitespacePluginError.prototype);
  12. }
  13. }
  14. exports.WhitespacePluginError = WhitespacePluginError;
  15. class MissingPluginError extends Error {
  16. constructor(pluginName, errorMessage = '', data = {}) {
  17. super(`Failed to load plugin ${pluginName}: ${errorMessage}`);
  18. this.__proto__ = Error;
  19. this.messageTemplate = 'plugin-missing';
  20. this.messageData = data;
  21. Object.setPrototypeOf(this, MissingPluginError.prototype);
  22. }
  23. }
  24. exports.MissingPluginError = MissingPluginError;
  25. //# sourceMappingURL=plugin-errors.js.map