error.js 525 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.formatErrors = exports.I18nError = void 0;
  4. function I18nError(message) {
  5. return new Error("[i18n] error: " + message);
  6. }
  7. exports.I18nError = I18nError;
  8. function formatErrors(errors) {
  9. var tpl = ['I18n errors found, please fix following issues before proceed:'];
  10. for (var i = 0; i < errors.length; i++) {
  11. tpl.push(i + 1 + ". " + errors[i].message);
  12. }
  13. return tpl.join('\n');
  14. }
  15. exports.formatErrors = formatErrors;