error.mjs 514 B

1234567891011121314151617181920
  1. import { isString } from '@vue/shared';
  2. class ElementPlusError extends Error {
  3. constructor(m) {
  4. super(m);
  5. this.name = "ElementPlusError";
  6. }
  7. }
  8. function throwError(scope, m) {
  9. throw new ElementPlusError(`[${scope}] ${m}`);
  10. }
  11. function debugWarn(scope, message) {
  12. if (process.env.NODE_ENV !== "production") {
  13. const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
  14. console.warn(error);
  15. }
  16. }
  17. export { debugWarn, throwError };
  18. //# sourceMappingURL=error.mjs.map